From daa68cffe0b8231864dab7a89c72faececc00b3c Mon Sep 17 00:00:00 2001 From: brain Date: Wed, 4 May 2005 12:57:35 +0000 Subject: Fix to a mode parsing bug (eating wrong version of parameter?) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1304 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/commands.cpp | 1 + src/connection.cpp | 6 +++--- src/inspircd.cpp | 14 ++++++++++++++ src/mode.cpp | 3 ++- 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/src/commands.cpp b/src/commands.cpp index 26f2c9ef2..edfd163db 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -1896,6 +1896,7 @@ void handle_v(char token,char* params,serverrec* source,serverrec* reply, char* if (!strcasecmp(me[j]->connectors[x].GetServerName().c_str(),servername)) { me[j]->connectors[x].SetVersionString(versionstr); + WriteOpers("Server '%s' (%d:%d) announces itself as version '%s'",me[j]->connectors[x].GetServerName().c_str(),j,x,me[j]->connectors[x].GetVersionString().c_str()); } } } diff --git a/src/connection.cpp b/src/connection.cpp index 6302b1e7e..d42dea179 100644 --- a/src/connection.cpp +++ b/src/connection.cpp @@ -492,8 +492,8 @@ bool connection::SendPacket(char *message, const char* sendhost) bool connection::RecvPacket(std::deque &messages, char* recvhost) { - char data[4096]; - memset(data, 0, 4096); + char data[65536]; + memset(data, 0, 65536); for (int i = 0; i < this->connectors.size(); i++) { if (this->connectors[i].GetState() != STATE_DISCONNECTED) @@ -509,7 +509,7 @@ bool connection::RecvPacket(std::deque &messages, char* recvhost) int ret = poll(&polls,1,1); if (ret <= 0) continue; - rcvsize = recv(this->connectors[i].GetDescriptor(),data,4090,0); + rcvsize = recv(this->connectors[i].GetDescriptor(),data,65000,0); data[rcvsize] = '\0'; if (rcvsize == -1) { diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 5485c2352..937354837 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -2831,6 +2831,20 @@ void handle_version(char **parameters, int pcnt, userrec *user) } else { + if (!strcmp(parameters[0],"*")) + { + for (int j = 0; j < 32; j++) + { + if (me[j] != NULL) + { + for (int x = 0; x < me[j]->connectors.size(); x++) + { + WriteServ(user->fd,"351 %s :Server %d:%d (%s): %s",user->nick,j,x,me[j]->connectors[x].GetServerName().c_str(),me[j]->connectors[x].GetVersionString().c_str()); + } + } + } + return; + } if (match(ServerName,parameters[0])) { WriteServ(user->fd,"351 %s :%s",user->nick,GetVersionString().c_str()); diff --git a/src/mode.cpp b/src/mode.cpp index e0c4d21db..87876141a 100644 --- a/src/mode.cpp +++ b/src/mode.cpp @@ -1057,7 +1057,8 @@ void process_modes(char **parameters,userrec* user,chanrec *chan,int status, int { if (t == -1) { - pc++; + //pc++; + param++; } else { -- cgit v1.2.3