]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Operhosts are now optional (in the type tag)
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Wed, 25 May 2005 20:45:49 +0000 (20:45 +0000)
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Wed, 25 May 2005 20:45:49 +0000 (20:45 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1520 e03df62e-2008-0410-955e-edbf42e46eb7

src/commands.cpp
src/modules/extra/m_sqloper.cpp

index 0570db66dc1c4fb5d4362c8235fb956d566bee9f..58597c2a039429974dd254ac9cb760089f78c99c 100644 (file)
@@ -1737,7 +1737,8 @@ void handle_oper(char **parameters, int pcnt, userrec *user)
                                        snprintf(global,MAXBUF,"| %s %s",user->nick,TypeName);
                                        NetSendToAll(global);
                                        ConfValue("type","host",j,HostName,&config_f);
-                                       ChangeDisplayedHost(user,HostName);
+                                       if (*HostName)
+                                               ChangeDisplayedHost(user,HostName);
                                        strlcpy(user->oper,TypeName,NICKMAX);
                                        found = true;
                                        fail2 = false;
index 51c26a749be61e1ead24a12d333f3e11784101fd..70e971aae67c8cfa8b9e5b82e161a03d6f5c6d7e 100644 (file)
@@ -148,7 +148,8 @@ class ModuleSQLOper : public Module
                                                        /* found this oper's opertype */
                                                        Srv->MeshSendAll("| "+std::string(user->nick)+" "+TypeName);
                                                        std::string HostName = Conf->ReadValue("type","host",j);
-                                                       Srv->ChangeHost(user,HostName);
+                                                       if (HostName != "")
+                                                               Srv->ChangeHost(user,HostName);
                                                        strlcpy(user->oper,TypeName.c_str(),NICKMAX);
                                                        WriteOpers("*** %s (%s@%s) is now an IRC operator of type %s",user->nick,user->ident,user->host,rowresult->GetField("type").c_str());
                                                        WriteServ(user->fd,"381 %s :You are now an IRC operator of type %s",user->nick,rowresult->GetField("type").c_str());