diff options
Diffstat (limited to 'src/commands/cmd_motd.cpp')
-rw-r--r-- | src/commands/cmd_motd.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/commands/cmd_motd.cpp b/src/commands/cmd_motd.cpp index b48c1c951..91ba5459f 100644 --- a/src/commands/cmd_motd.cpp +++ b/src/commands/cmd_motd.cpp @@ -46,7 +46,11 @@ CmdResult CommandMotd::Handle (const std::vector<std::string>& parameters, User if (parameters.size() > 0 && parameters[0] != ServerInstance->Config->ServerName) return CMD_SUCCESS; - ConfigFileCache::iterator motd = ServerInstance->Config->Files.find("motd"); + ConfigTag* tag = NULL; + if (IS_LOCAL(user)) + tag = user->GetClass()->config; + std::string motd_name = tag->getString("motd", "motd"); + ConfigFileCache::iterator motd = ServerInstance->Config->Files.find(motd_name); if (motd == ServerInstance->Config->Files.end()) { user->SendText(":%s %03d %s :Message of the day file is missing.", |