mirror of
https://github.com/anope/anope.git
synced 2026-07-02 18:33:12 +02:00
Use paths relative to data/conf in the config file.
This was done in some places already but not consistently. Closes #349.
This commit is contained in:
+3
-2
@@ -241,10 +241,11 @@ void MOTD::Run(MessageSource &source, const std::vector<Anope::string> ¶ms,
|
||||
if (s != Me)
|
||||
return;
|
||||
|
||||
std::ifstream stream(Config->GetBlock("serverinfo")->Get<const Anope::string>("motd").str());
|
||||
auto motdfile = Anope::ExpandConfig(Config->GetBlock("serverinfo")->Get<const Anope::string>("motd"));
|
||||
std::ifstream stream(motdfile.str());
|
||||
if (!stream.is_open())
|
||||
{
|
||||
IRCD->SendNumeric(ERR_NOSUCHNICK, source.GetSource(), "- MOTD file not found! Please contact your IRC administrator.");
|
||||
IRCD->SendNumeric(ERR_NOSUCHNICK, source.GetSource(), "- MOTD file not readable! Please contact your IRC administrator.");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user