summaryrefslogtreecommitdiff
path: root/src/commands
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2010-02-08 15:07:29 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2010-02-08 15:07:29 +0000
commitf0a928a2f7de2ebde53dfb6cf25ead86a5e480d8 (patch)
tree609902d290f08af070a5f7ec3264dbfb700d9ede /src/commands
parentca0b7b42bddc6d8d0eecd011323a255ca6e3de25 (diff)
Allow <connect motd> to select an alternate MOTD file to display
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12399 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/commands')
-rw-r--r--src/commands/cmd_motd.cpp6
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.",