X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodes%2Fumode_w.cpp;h=58cbbee38ab970044fb3c215e9d438a0daefd9af;hb=97ab3c404ccd201681f465aa2c3e9ff6586acbd8;hp=f9608bf0ba04346f14b26872984c819aa10ec12e;hpb=a7cbd51d457a5e3b435396092bc7e2fcf79168e1;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modes/umode_w.cpp b/src/modes/umode_w.cpp index f9608bf0b..58cbbee38 100644 --- a/src/modes/umode_w.cpp +++ b/src/modes/umode_w.cpp @@ -2,7 +2,7 @@ * | Inspire Internet Relay Chat Daemon | * +------------------------------------+ * - * InspIRCd: (C) 2002-2007 InspIRCd Development Team + * InspIRCd: (C) 2002-2009 InspIRCd Development Team * See: http://www.inspircd.org/wiki/index.php/Credits * * This program is free but copyrighted software; see @@ -17,23 +17,11 @@ #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(Instance, 'w') { } -ModeAction ModeUserWallops::OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string ¶meter, bool adding) +unsigned int ModeUserWallops::GetCount() { - /* 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; + return count; }