1 /* +------------------------------------+
2 * | Inspire Internet Relay Chat Daemon |
3 * +------------------------------------+
5 * InspIRCd: (C) 2002-2009 InspIRCd Development Team
6 * See: http://wiki.inspircd.org/Credits
8 * This program is free but copyrighted software; see
9 * the file COPYING for details.
11 * ---------------------------------------------------
17 #include "treesocket.h"
18 #include "treeserver.h"
21 /* $ModDep: m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/treesocket.h */
24 /** Because the core won't let users or even SERVERS set +o,
25 * we use the OPERTYPE command to do this.
27 bool TreeSocket::OperType(const std::string &prefix, parameterlist ¶ms)
29 if (params.size() != 1)
31 std::string opertype = params[0];
32 User* u = ServerInstance->FindNick(prefix);
36 ServerInstance->Users->all_opers.push_back(u);
37 u->modes[UM_OPERATOR] = 1;
38 u->oper.assign(opertype, 0, 512);
39 Utils->DoOneToAllButSender(u->uuid, "OPERTYPE", params, u->server);
41 TreeServer* remoteserver = Utils->FindServer(u->server);
44 if (this->Utils->quiet_bursts)
47 * If quiet bursts are enabled, and server is bursting or silent uline (i.e. services),
48 * then do nothing. -- w00t
51 remoteserver->bursting ||
52 ServerInstance->SilentULine(ServerInstance->FindServerNamePtr(u->server))
60 ServerInstance->SNO->WriteToSnoMask('O',"From %s: User %s (%s@%s) is now an IRC operator of type %s",u->server, u->nick.c_str(),u->ident.c_str(), u->host.c_str(), irc::Spacify(opertype.c_str()));