diff options
author | Sadie Powell <sadie@witchery.services> | 2024-03-19 15:39:41 +0000 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2024-03-19 15:51:55 +0000 |
commit | bfed2e1bf5cfb250e17e91566546b38b4b9a34d8 (patch) | |
tree | ecf5ba2049ae1752cff533e060d2dce50983c04e /src/messages.cpp | |
parent | e488f294a116224d8c7f89c6c4ebad2356ba7814 (diff) |
Use paths relative to data/conf in the config file.
This was done in some places already but not consistently.
Closes #349.
Diffstat (limited to 'src/messages.cpp')
-rw-r--r-- | src/messages.cpp | 5 |
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> ¶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; } |