diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-04-30 16:27:32 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-04-30 16:27:32 +0000 |
commit | d190f6e7c22d0b246a90f60dbadb7f8f44f0d813 (patch) | |
tree | 2cdcb42b48af704c40cb521ea9299909f8157a43 /src/inspircd.cpp | |
parent | c12ec889bb600626ecbd0cb903564f639ee55700 (diff) |
Changed how remote version works a bit
Commented some of connection.cpp
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1268 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/inspircd.cpp')
-rw-r--r-- | src/inspircd.cpp | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 59256f8c0..2671de21b 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -2746,6 +2746,12 @@ void handle_version(char **parameters, int pcnt, userrec *user) } else { + if (match(ServerName,parameters[0])) + { + WriteServ(user->fd,"351 %s :%s",user->nick,GetVersionString().c_str()); + return; + } + bool displayed = false, found = false; for (int j = 0; j < 32; j++) { if (me[j] != NULL) @@ -2754,12 +2760,21 @@ void handle_version(char **parameters, int pcnt, userrec *user) { if (match(me[j]->connectors[x].GetServerName().c_str(),parameters[0])) { - WriteServ(user->fd,"351 %s :%s",user->nick,me[j]->connectors[x].GetVersionString().c_str()); - return; + found = true; + if ((me[j]->connectors[x].GetVersionString() != "") && (!displayed)) + { + displayed = true; + WriteServ(user->fd,"351 %s :%s",user->nick,me[j]->connectors[x].GetVersionString().c_str()); + } } } } } + if ((!displayed) && (found)) + { + WriteServ(user->fd,"402 %s %s :Server %s has no version information",user->nick,parameters[0],parameters[0]); + return; + } WriteServ(user->fd,"402 %s %s :No such server",user->nick,parameters[0]); } return; |