5 #include "modes/umode_n.h"
7 ModeUserServerNoticeMask::ModeUserServerNoticeMask(InspIRCd* Instance) : ModeHandler(Instance, '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 */
20 parameter = dest->ProcessNoticeMasks(parameter.c_str());
21 return MODEACTION_ALLOW;
23 else if (dest->modes[UM_SNOMASK] != false)
25 dest->modes[UM_SNOMASK] = false;
26 return MODEACTION_ALLOW;
29 /* Allow the change */
30 return MODEACTION_DENY;