1 /* +------------------------------------+
2 * | Inspire Internet Relay Chat Daemon |
3 * +------------------------------------+
5 * InspIRCd: (C) 2002-2007 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_w.h"
20 ModeUserWallops::ModeUserWallops(InspIRCd* Instance) : ModeHandler(Instance, 'w', 0, 0, false, MODETYPE_USER, false)
24 ModeAction ModeUserWallops::OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding)
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_WALLOPS] != adding)
33 dest->modes[UM_WALLOPS] = adding;
34 return MODEACTION_ALLOW;
37 /* Allow the change */
38 return MODEACTION_DENY;
41 unsigned int ModeUserWallops::GetCount()