]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modes/umode_s.cpp
fix LoopCalls to not send param count thus avoiding a crash in command parser
[user/henk/code/inspircd.git] / src / modes / umode_s.cpp
index 4e5fba8e06fc9861c260cfc703d859c2eba75b73..6b6e521eb975156f7733e31dcd28068ada1548bb 100644 (file)
 #include "users.h"
 #include "modes/umode_s.h"
 
-ModeUserServerNotice::ModeUserServerNotice(InspIRCd* Instance) : ModeHandler(Instance, 's', 0, 0, false, MODETYPE_USER, false)
+ModeUserServerNotice::ModeUserServerNotice(InspIRCd* Instance) : SimpleUserModeHandler(Instance, 's')
 {
 }
 
-ModeAction ModeUserServerNotice::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_SERVERNOTICE] != adding)
-       {
-               dest->modes[UM_SERVERNOTICE] = adding;
-               return MODEACTION_ALLOW;
-       }
-
-       /* Allow the change */
-       return MODEACTION_DENY;
-}
-
 unsigned int ModeUserServerNotice::GetCount()
 {
        return count;