]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modes/umode_s.cpp
Fix desync with halfop and voice when opped (this happens because we were ORing the...
[user/henk/code/inspircd.git] / src / modes / umode_s.cpp
index 4a5add907bf7a6ac0bb9c1b225da47874227da05..4b3179001af415419eb14950628f1ba05720bdd8 100644 (file)
@@ -1,3 +1,16 @@
+/*       +------------------------------------+
+ *       | Inspire Internet Relay Chat Daemon |
+ *       +------------------------------------+
+ *
+ *  InspIRCd: (C) 2002-2007 InspIRCd Development Team
+ * See: http://www.inspircd.org/wiki/index.php/Credits
+ *
+ * This program is free but copyrighted software; see
+ *            the file COPYING for details.
+ *
+ * ---------------------------------------------------
+ */
+
 #include "inspircd.h"
 #include "mode.h"
 #include "channels.h"
@@ -18,9 +31,15 @@ ModeAction ModeUserServerNotice::OnModeChange(userrec* source, userrec* dest, ch
        if (dest->modes[UM_SERVERNOTICE] != adding)
        {
                dest->modes[UM_SERVERNOTICE] = adding;
+               this->count += (adding ? 1: -1);
                return MODEACTION_ALLOW;
        }
 
        /* Allow the change */
        return MODEACTION_DENY;
 }
+
+unsigned int ModeUserServerNotice::GetCount()
+{
+       return count;
+}