]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/cmd_oper.cpp
This needs some general QA-ing. Add support to new parser (introduced in 1.1) for...
[user/henk/code/inspircd.git] / src / cmd_oper.cpp
index af0ad838b5bea24b3d03df2f455195ea7be96894..7c7ab391e75aa4153f1e1216b515abf3fe819b7b 100644 (file)
@@ -79,9 +79,6 @@ CmdResult cmd_oper::Handle (const char** parameters, int pcnt, userrec *user)
                                if (!strcmp(TypeName,OperType))
                                {
                                        /* found this oper's opertype */
-                                       ServerInstance->Config->ConfValue(ServerInstance->Config->config_data, "type","host", j, HostName, MAXBUF);
-                                       if (*HostName)
-                                               user->ChangeDisplayedHost(HostName);
                                        if (!ServerInstance->IsNick(TypeName))
                                        {
                                                user->WriteServ("491 %s :Invalid oper type (oper types must follow the same syntax as nicknames)",user->nick);
@@ -89,6 +86,9 @@ CmdResult cmd_oper::Handle (const char** parameters, int pcnt, userrec *user)
                                                ServerInstance->Log(DEFAULT,"OPER: Failed oper attempt by %s!%s@%s: credentials valid, but oper type erroneous.",user->nick,user->ident,user->host);
                                                return CMD_FAILURE;
                                        }
+                                       ServerInstance->Config->ConfValue(ServerInstance->Config->config_data, "type","host", j, HostName, MAXBUF);
+                                       if (*HostName)
+                                               user->ChangeDisplayedHost(HostName);
                                        found = true;
                                        type_invalid = false;
                                        break;