5 #include "modes/umode_n.h"
7 ModeUserServerNoticeMask::ModeUserServerNoticeMask() : ModeHandler('n', 1, 0, false, MODETYPE_USER, true)
11 ModeAction ModeUserServerNoticeMask::OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string ¶meter, bool adding)
13 /* Only opers can change other users modes */
14 if ((source != dest) && (!*source->oper))
15 return MODEACTION_DENY;
17 /* Set the bitfields */
18 if (dest->modes[UM_SERVERNOTICE] != adding)
20 dest->modes[UM_SERVERNOTICE] = adding;
21 return MODEACTION_ALLOW;
24 /* Allow the change */
25 return MODEACTION_DENY;