]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modes/umode_i.cpp
Remove InspIRCd* parameters and fields
[user/henk/code/inspircd.git] / src / modes / umode_i.cpp
index e3f81c52907a38cac04f209f93443b6617b9652c..515ffd10e52ba8f997d9b4c3e93d5ad79838a131 100644 (file)
@@ -2,8 +2,8 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd: (C) 2002-2007 InspIRCd Development Team
- * See: http://www.inspircd.org/wiki/index.php/Credits
+ *  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 "users.h"
 #include "modes/umode_i.h"
 
-ModeUserInvisible::ModeUserInvisible(InspIRCd* Instance) : ModeHandler(Instance, 'i', 0, 0, false, MODETYPE_USER, false)
+ModeUserInvisible::ModeUserInvisible() : SimpleUserModeHandler(NULL, 'i')
 {
 }
 
-ModeAction ModeUserInvisible::OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
-{
-       /* Only opers can change other users modes */
-       if ((source != dest) && (!*source->oper))
-               return MODEACTION_DENY;
-
-       /* Set the bitfields */
-       if (dest->modes[UM_INVISIBLE] != adding)
-       {
-               dest->modes[UM_INVISIBLE] = adding;
-               this->count += (adding ? 1: -1);
-               return MODEACTION_ALLOW;
-       }
-
-       /* Allow the change */
-       return MODEACTION_DENY;
-}
-
-unsigned int GetCount()
+unsigned int ModeUserInvisible::GetCount()
 {
        return count;
 }