X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodes%2Fumode_i.cpp;h=e652b803a76884036e47cc358289ecd4bc61dd49;hb=26cd5393c9308fabe73c41870f06f73a5b001cd7;hp=73d7293a8a133c808da86ea188ff1a4028c7593c;hpb=a7cbd51d457a5e3b435396092bc7e2fcf79168e1;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modes/umode_i.cpp b/src/modes/umode_i.cpp index 73d7293a8..e652b803a 100644 --- a/src/modes/umode_i.cpp +++ b/src/modes/umode_i.cpp @@ -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. @@ -17,23 +17,11 @@ #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, "invisible", 'i') { } -ModeAction ModeUserInvisible::OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string ¶meter, bool adding) +unsigned int ModeUserInvisible::GetCount() { - /* 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; - return MODEACTION_ALLOW; - } - - /* Allow the change */ - return MODEACTION_DENY; + return count; }