1 /* +------------------------------------+
2 * | Inspire Internet Relay Chat Daemon |
3 * +------------------------------------+
5 * InspIRCd: (C) 2002-2008 InspIRCd Development Team
6 * See: http://www.inspircd.org/wiki/index.php/Credits
8 * This program is free but copyrighted software; see
9 * the file COPYING for details.
11 * ---------------------------------------------------
18 #include "modes/umode_s.h"
20 ModeUserServerNotice::ModeUserServerNotice(InspIRCd* Instance) : ModeHandler(Instance, 's', 0, 0, false, MODETYPE_USER, false)
24 ModeAction ModeUserServerNotice::OnModeChange(User* source, User* dest, Channel*, std::string&, bool adding, bool servermode)
26 /* Only opers can change other users modes */
27 if ((source != dest) && (!*source->oper))
28 return MODEACTION_DENY;
30 /* Set the bitfields */
31 if (dest->modes[UM_SERVERNOTICE] != adding)
33 dest->modes[UM_SERVERNOTICE] = adding;
34 return MODEACTION_ALLOW;
37 /* Allow the change */
38 return MODEACTION_DENY;
41 unsigned int ModeUserServerNotice::GetCount()