-ModeAction ModeUserInvisible::OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string ¶meter, bool adding)
-{
- /* Only opers can change other users modes */
- if ((source != dest) && (!*source->oper))
- return MODEACTION_DENY;
-
- /* Set the bitfields */
- if (dest->modes[UM_INVISIBLE] != adding)
- {
- dest->modes[UM_INVISIBLE] = adding;
- this->count += (adding ? 1: -1);
- return MODEACTION_ALLOW;
- }
-
- /* Allow the change */
- return MODEACTION_DENY;
-}
-