]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/commands/cmd_oper.cpp
Fix obvious oversight spotted by Ankit, provide xline reasons when adding them
[user/henk/code/inspircd.git] / src / commands / cmd_oper.cpp
index 8522890e0266bb56235f8859a4a797d407c1693d..076a77df25fefc45ad8e024d9bce1b09f90f6186 100644 (file)
@@ -21,7 +21,7 @@ bool OneOfMatches(const char* host, const char* ip, const char* hostlist)
        std::string xhost;
        while (hl >> xhost)
        {
-               if (InspIRCd::MatchCIDR(host, xhost, NULL) || InspIRCd::MatchCIDR(ip, xhost, NULL))
+               if (InspIRCd::Match(host, xhost, NULL) || InspIRCd::MatchCIDR(ip, xhost, NULL))
                {
                        return true;
                }
@@ -106,10 +106,7 @@ CmdResult CommandOper::Handle (const std::vector<std::string>& parameters, User
        if (found)
        {
                /* correct oper credentials */
-               ServerInstance->SNO->WriteToSnoMask('o',"%s (%s@%s) is now an IRC operator of type %s (using oper '%s')", user->nick.c_str(), user->ident.c_str(), user->host.c_str(), irc::Spacify(OperType), parameters[0].c_str());
-               user->WriteNumeric(381, "%s :You are now %s %s",user->nick.c_str(), strchr("aeiouAEIOU", *OperType) ? "an" : "a", irc::Spacify(OperType));
-               if (!user->IsModeSet('o'))
-                       user->Oper(OperType, LoginName);
+               user->Oper(OperType, LoginName);
        }
        else
        {