]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Allow <connect motd> to select an alternate MOTD file to display
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>
Mon, 8 Feb 2010 15:07:29 +0000 (15:07 +0000)
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>
Mon, 8 Feb 2010 15:07:29 +0000 (15:07 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12399 e03df62e-2008-0410-955e-edbf42e46eb7

src/commands/cmd_motd.cpp

index b48c1c951a87c0ad5986cb545e74ebd8086e8314..91ba5459fcf5c1cf8a5c69b83b61bc5213908898 100644 (file)
@@ -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.",