5 #include "modes/umode_i.h"
7 ModeUserInvisible::ModeUserInvisible() : ModeHandler('i', 0, 0, false, MODETYPE_USER, false)
11 ModeAction ModeUserInvisible::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_ALLOW;
17 /* Set the bitfields */
18 adding ? dest->modebits |= UM_INVISIBLE : dest->modebits &= ~UM_INVISIBLE;
20 /* Use the bitfields to build the user's mode string */
21 ModeParser::BuildModeString(dest);
23 /* Allow the change */
24 return MODEACTION_ALLOW;