X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_spanningtree%2Fopertype.cpp;h=021100870e7dcfe12b9d4b1f834aaea81f3ef998;hb=fd1d19d6345943ecdb5ce4ef947f9b3c5c8bca86;hp=97a4de8c20ee5fc53f6534c691dd0c8ced78eaa7;hpb=f1b04d0ef846713b38f9190a9f34a0c42bfa01cc;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_spanningtree/opertype.cpp b/src/modules/m_spanningtree/opertype.cpp index 97a4de8c2..021100870 100644 --- a/src/modules/m_spanningtree/opertype.cpp +++ b/src/modules/m_spanningtree/opertype.cpp @@ -29,8 +29,8 @@ CmdResult CommandOpertype::Handle(const std::vector& params, User *u) { SpanningTreeUtilities* Utils = ((ModuleSpanningTree*)(Module*)creator)->Utils; - std::string opertype = params[0]; - if (!IS_OPER(u)) + const std::string& opertype = params[0]; + if (!u->IsOper()) ServerInstance->Users->all_opers.push_back(u); u->modes[UM_OPERATOR] = 1; OperIndex::iterator iter = ServerInstance->Config->oper_blocks.find(" " + opertype); @@ -53,7 +53,7 @@ CmdResult CommandOpertype::Handle(const std::vector& params, User * return CMD_SUCCESS; } - ServerInstance->SNO->WriteToSnoMask('O',"From %s: User %s (%s@%s) is now an IRC operator of type %s",u->server.c_str(), u->nick.c_str(),u->ident.c_str(), u->host.c_str(), irc::Spacify(opertype.c_str())); + ServerInstance->SNO->WriteToSnoMask('O',"From %s: User %s (%s@%s) is now an IRC operator of type %s",u->server.c_str(), u->nick.c_str(),u->ident.c_str(), u->host.c_str(), opertype.c_str()); return CMD_SUCCESS; }