From 48d7ad4a34be421fec52c3e6e89758021e9bd127 Mon Sep 17 00:00:00 2001 From: w00t Date: Fri, 2 Feb 2007 15:43:55 +0000 Subject: Don't set a user's oper host unless they are using a correct opertype - we don't oper them, so don't set the host either git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6479 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/cmd_oper.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/cmd_oper.cpp') diff --git a/src/cmd_oper.cpp b/src/cmd_oper.cpp index af0ad838b..7c7ab391e 100644 --- a/src/cmd_oper.cpp +++ b/src/cmd_oper.cpp @@ -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; -- cgit v1.3.1-10-gc9f91