]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Add <options:cyclehostsfromuser> to configure source for mode changes on host cycle
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>
Sun, 14 Mar 2010 23:59:43 +0000 (23:59 +0000)
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>
Sun, 14 Mar 2010 23:59:43 +0000 (23:59 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12636 e03df62e-2008-0410-955e-edbf42e46eb7

include/configreader.h
src/configreader.cpp
src/users.cpp

index 57134390a4d7d3b3a6ca60b53d4387eff5f7b2d3..02ed3d5612b998352b327d0906546cb01e02eb51 100644 (file)
@@ -491,6 +491,11 @@ class CoreExport ServerConfig
         */
        bool CycleHosts;
 
+       /** If set to true, the CycleHosts mode change will be sourced from the user,
+        * rather than the server
+        */
+       bool CycleHostsFromUser;
+
        /** If set to true, prefixed channel NOTICEs and PRIVMSGs will have the prefix
         *  added to the outgoing text for undernet style msg prefixing.
         */
index d63377bbeeacd0afd1959206e63924d35dcea92b..c2c66fc316efa0d407520edf029fad821a5e924e 100644 (file)
@@ -479,6 +479,7 @@ void ServerConfig::Fill()
        NoUserDns = ConfValue("performance")->getBool("nouserdns");
        SyntaxHints = options->getBool("syntaxhints");
        CycleHosts = options->getBool("cyclehosts");
+       CycleHostsFromUser = options->getBool("cyclehostsfromuser");
        UndernetMsgPrefix = options->getBool("ircumsgprefix");
        FullHostInTopic = options->getBool("hostintopic");
        MaxTargets = security->getInt("maxtargets", 20);
index d30526186a4b87c9f2a3c0f21f06b0c0464493ab..8aeb4a1f6318ac6ed70a0ac79b3b353cbd223b68 100644 (file)
@@ -1393,7 +1393,9 @@ void User::DoHostCycle(const std::string &quitline)
                {
                        for(unsigned int i=0; i < memb->modes.length(); i++)
                                modeline.append(" ").append(nick);
-                       snprintf(buffer, MAXBUF, ":%s MODE %s +%s", GetFullHost().c_str(), c->name.c_str(), modeline.c_str());
+                       snprintf(buffer, MAXBUF, ":%s MODE %s +%s",
+                               ServerInstance->Config->CycleHostsFromUser ? GetFullHost().c_str() : ServerInstance->Config->ServerName.c_str(),
+                               c->name.c_str(), modeline.c_str());
                        modeline = buffer;
                }