X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodes%2Fumode_w.cpp;h=fe4ba8ccdb971c50c3405854e993acbd0ceec8c1;hb=4b856bda135a08e800b96c970a10b0b6a34d433a;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..fe4ba8ccd 100644 --- a/src/modes/umode_w.cpp +++ b/src/modes/umode_w.cpp @@ -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(Instance, '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;