summaryrefslogtreecommitdiff
path: root/src/commands.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-05-03 20:12:47 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-05-03 20:12:47 +0000
commita83a728b91e3274ec5d367fa33b6f86b2292670d (patch)
tree58ce856581206a54ca8182425b2e9b3a370a42e8 /src/commands.cpp
parent0fa6fadb9c48dc7d9f705517d9bf1cfbd79d2209 (diff)
Fix annoying off-by-one error in connection::RecvPacket (nothing like driving to calm the mind :p)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1298 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/commands.cpp')
-rw-r--r--src/commands.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/commands.cpp b/src/commands.cpp
index d28094bf2..2eff8186d 100644
--- a/src/commands.cpp
+++ b/src/commands.cpp
@@ -2061,7 +2061,7 @@ void handle_M(char token,char* params,serverrec* source,serverrec* reply, char*
pars[index++] = parameter;
parameter = strtok(NULL," ");
}
- log(DEBUG,"*** MODE: %s %s",pars[0],pars[1]);
+ log(DEBUG,"*** MODE: '%s %s'",pars[0],pars[1]);
merge_mode(pars,index);
if (FindChan(target))
{
@@ -2114,7 +2114,8 @@ void handle_m(char token,char* params,serverrec* source,serverrec* reply, char*
}
log(DEBUG,"Calling merge_mode2");
- merge_mode2(pars,index,user);
+ if (index)
+ merge_mode2(pars,index,user);
}
}
@@ -3197,7 +3198,7 @@ void handle_link_packet(char* udp_msg, char* tcp_host, serverrec *serv)
char* serverdesc = finalparam+2;
if ((!cookie) || (!servername) || (!serverdesc))
- break;
+ return;
WriteOpers("AuthCookie CONNECT from %s (%s)",servername,tcp_host);
@@ -3247,9 +3248,7 @@ void handle_link_packet(char* udp_msg, char* tcp_host, serverrec *serv)
char* serverdesc = finalparam+2;
if ((!servername) || (!password) || (!myport) || (!revision) || (!serverdesc))
- break;
-
- password = password;
+ return;
WriteOpers("CONNECT from %s (%s) (their port: %d)",servername,tcp_host,atoi(myport));
@@ -3413,7 +3412,7 @@ void handle_link_packet(char* udp_msg, char* tcp_host, serverrec *serv)
char* serverdesc = finalparam+2;
if ((!password) || (!servername) || (!serverdesc))
- break;
+ return;
char Link_ServerName[1024];
char Link_IPAddr[1024];