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_o.h"
20 ModeUserOperator::ModeUserOperator(InspIRCd* Instance) : ModeHandler(Instance, 'o', 0, 0, false, MODETYPE_USER, true)
24 ModeAction ModeUserOperator::OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding)
26 /* Only opers can execute this class at all */
28 return MODEACTION_DENY;
30 /* Not even opers can GIVE the +o mode, only take it away */
32 return MODEACTION_DENY;
35 * Note that oper status is only given in cmd_oper.cpp
36 * NOT here. It is impossible to directly set +o without
37 * verifying as an oper and getting an opertype assigned
40 ServerInstance->SNO->WriteToSnoMask('o', "User %s de-opered (by %s)", dest->nick, source->nick);
43 return MODEACTION_ALLOW;
46 unsigned int ModeUserOperator::GetCount()
48 return ServerInstance->all_opers.size();