summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-05-25 20:45:49 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-05-25 20:45:49 +0000
commite9b7b237c0370cd5f10f69c1c4878d464865b30b (patch)
tree908340cbe2bb5a99b7d7c24f99acfa2ebb77ad7d
parentc922299f3eb53fe9ec2213525745159ee81f6f3c (diff)
Operhosts are now optional (in the type tag)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1520 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/commands.cpp3
-rw-r--r--src/modules/extra/m_sqloper.cpp3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/commands.cpp b/src/commands.cpp
index 0570db66d..58597c2a0 100644
--- a/src/commands.cpp
+++ b/src/commands.cpp
@@ -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;
diff --git a/src/modules/extra/m_sqloper.cpp b/src/modules/extra/m_sqloper.cpp
index 51c26a749..70e971aae 100644
--- a/src/modules/extra/m_sqloper.cpp
+++ b/src/modules/extra/m_sqloper.cpp
@@ -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());