]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modes/umode_i.cpp
Run configure -update on all svn/git changes
[user/henk/code/inspircd.git] / src / modes / umode_i.cpp
index 08af105cabbc3a05d0565dfdf2eab8f15fa3a808..5c7c41b629948e0c528d00b5df99181418e048c2 100644 (file)
@@ -1,25 +1,27 @@
+/*       +------------------------------------+
+ *       | Inspire Internet Relay Chat Daemon |
+ *       +------------------------------------+
+ *
+ *  InspIRCd: (C) 2002-2009 InspIRCd Development Team
+ * See: http://wiki.inspircd.org/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_i.h"
 
-ModeUserInvisible::ModeUserInvisible() : ModeHandler('i', 0, 0, false, MODETYPE_USER, false)
+ModeUserInvisible::ModeUserInvisible(InspIRCd* Instance) : SimpleUserModeHandler(NULL, 'i')
 {
 }
 
-ModeAction ModeUserInvisible::OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
+unsigned int ModeUserInvisible::GetCount()
 {
-       /* Only opers can change other users modes */
-       if ((source != dest) && (!*source->oper))
-               return MODEACTION_ALLOW;
-
-       /* Set the bitfields */
-       adding ? dest->modebits |= UM_INVISIBLE : dest->modebits &= ~UM_INVISIBLE;
-
-       /* Use the bitfields to build the user's mode string */
-       ModeParser::BuildModeString(dest);
-
-       /* Allow the change */
-       return MODEACTION_ALLOW;
+       return count;
 }