]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modes/umode_w.cpp
Add config <options:disablehmac> to support disabling of HMAC, and tidy up to detect...
[user/henk/code/inspircd.git] / src / modes / umode_w.cpp
index 8cfbf8fd24df6d9cab091cbba0cec6b88a386c10..383c91f6ef1f5e6a179d568a42141e41bd6e6e23 100644 (file)
@@ -1,10 +1,23 @@
+/*       +------------------------------------+
+ *       | 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"
 #include "users.h"
 #include "modes/umode_w.h"
 
-ModeUserWallops::ModeUserWallops() : ModeHandler('w', 0, 0, false, MODETYPE_USER, false)
+ModeUserWallops::ModeUserWallops(InspIRCd* Instance) : ModeHandler(Instance, 'w', 0, 0, false, MODETYPE_USER, false)
 {
 }
 
@@ -18,9 +31,16 @@ ModeAction ModeUserWallops::OnModeChange(userrec* source, userrec* dest, chanrec
        if (dest->modes[UM_WALLOPS] != adding)
        {
                dest->modes[UM_WALLOPS] = adding;
+               this->count += (adding ? 1: -1);
                return MODEACTION_ALLOW;
        }
 
        /* Allow the change */
        return MODEACTION_DENY;
 }
+
+unsigned int ModeUserWallops::GetCount()
+{
+       return count;
+}
+