]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/commands/cmd_oper.cpp
Always deny invite to users below halfop status, move OnUserPreInvite up to above...
[user/henk/code/inspircd.git] / src / commands / cmd_oper.cpp
index dc06d87ced3777284582bc491a03acb1be1de881..97134f0389fa5116e2e85c6c6098571c519c1629 100644 (file)
@@ -66,7 +66,7 @@ CmdResult CommandOper::Handle (const std::vector<std::string>& parameters, User
                ServerInstance->Config->ConfValue(ServerInstance->Config->config_data, "oper", "hash", i, HashType, MAXBUF);
 
                match_login = (LoginName == parameters[0]);
-               match_pass = !ServerInstance->PassCompare(user, Password,parameters[1].c_str(), HashType);
+               match_pass = !ServerInstance->PassCompare(user, Password, parameters[1], HashType);
                match_hosts = OneOfMatches(TheHost,TheIP,HostName);
 
                if (match_login && match_pass && match_hosts)
@@ -80,7 +80,7 @@ CmdResult CommandOper::Handle (const std::vector<std::string>& parameters, User
                                if (!strcmp(TypeName,OperType))
                                {
                                        /* found this oper's opertype */
-                                       if (!ServerInstance->IsNick(TypeName))
+                                       if (!ServerInstance->IsNick(TypeName, ServerInstance->Config->Limits.NickMax))
                                        {
                                                user->WriteNumeric(491, "%s :Invalid oper type (oper types must follow the same syntax as nicknames)",user->nick.c_str());
                                                ServerInstance->SNO->WriteToSnoMask('o',"CONFIGURATION ERROR! Oper type '%s' contains invalid characters",OperType);