]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/opertype.cpp
Replace hardcoded mode letters, part 3
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / opertype.cpp
index 97a4de8c20ee5fc53f6534c691dd0c8ced78eaa7..021100870e7dcfe12b9d4b1f834aaea81f3ef998 100644 (file)
@@ -29,8 +29,8 @@
 CmdResult CommandOpertype::Handle(const std::vector<std::string>& 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<std::string>& 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;
 }