summaryrefslogtreecommitdiff
path: root/src/messages.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/messages.cpp')
-rw-r--r--src/messages.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/messages.cpp b/src/messages.cpp
index 4b2e134ff..9a0a7a539 100644
--- a/src/messages.cpp
+++ b/src/messages.cpp
@@ -241,10 +241,11 @@ void MOTD::Run(MessageSource &source, const std::vector<Anope::string> &params,
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;
}