X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodes%2Fumode_w.cpp;h=8cc31094db91fb823e9a930342b0b02eca43cfe3;hb=1524caf2f799cff54c2de330c9670a0b761ba3d8;hp=32fbe9e763ccf0ad1b5f5d225c6d22185fa24fb1;hpb=32a26fa539242d009ffab01e09cafdaba9270dac;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modes/umode_w.cpp b/src/modes/umode_w.cpp index 32fbe9e76..8cc31094d 100644 --- a/src/modes/umode_w.cpp +++ b/src/modes/umode_w.cpp @@ -2,8 +2,8 @@ * | Inspire Internet Relay Chat Daemon | * +------------------------------------+ * - * InspIRCd: (C) 2002-2008 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,27 +17,10 @@ #include "users.h" #include "modes/umode_w.h" -ModeUserWallops::ModeUserWallops(InspIRCd* Instance) : ModeHandler(Instance, 'w', 0, 0, false, MODETYPE_USER, false) +ModeUserWallops::ModeUserWallops(InspIRCd* Instance) : SimpleUserModeHandler(NULL, 'w') { } -ModeAction ModeUserWallops::OnModeChange(User* source, User* dest, Channel*, std::string&, bool adding, bool servermode) -{ - /* Only opers can change other users modes */ - if ((source != dest) && (!*source->oper)) - return MODEACTION_DENY; - - /* Set the bitfields */ - if (dest->modes[UM_WALLOPS] != adding) - { - dest->modes[UM_WALLOPS] = adding; - return MODEACTION_ALLOW; - } - - /* Allow the change */ - return MODEACTION_DENY; -} - unsigned int ModeUserWallops::GetCount() { return count;