From 882c2d2e8c584544d024b168cd6a1f8512eb8d77 Mon Sep 17 00:00:00 2001 From: brain Date: Tue, 19 Apr 2005 03:13:29 +0000 Subject: Fixed bug when ordering a bot to leave using anope services git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1130 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/commands.cpp | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'src/commands.cpp') diff --git a/src/commands.cpp b/src/commands.cpp index 5e5cf66c8..40edee6e2 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -1970,23 +1970,25 @@ void handle_L(char token,char* params,serverrec* source,serverrec* reply, char* char* nick = NULL; char* channel = NULL; char* reason = NULL; - if (strchr(params,':')) - { - nick = strtok(params," "); - channel = strtok(NULL," :"); - reason = strtok(NULL,"\r\n"); - reason++; - } - else + log(DEBUG,"L TOKEN PARS: '%s'",params); + if (strstr(params,":#")) { nick = strtok(params," "); channel = strtok(NULL,"\r\n"); + channel++; reason = ""; } + else + { + nick = strtok(params," "); + channel = strtok(NULL," :"); + reason = strtok(NULL,"\r\n"); + reason++; + } userrec* user = Find(nick); if ((user) && (channel) && (reason)) { - if (strcmp(reason,"")) + if ((!reason) && (*reason != '\0')) { del_channel(user,channel,reason,true); } -- cgit v1.3.1-10-gc9f91