]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modes/umode_w.cpp
Make User:: nick/ident/dhost/fullname and some other things std::string instead of...
[user/henk/code/inspircd.git] / src / modes / umode_w.cpp
index 32fbe9e763ccf0ad1b5f5d225c6d22185fa24fb1..fe4ba8ccdb971c50c3405854e993acbd0ceec8c1 100644 (file)
 #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;