summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-04-19 03:13:29 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-04-19 03:13:29 +0000
commit882c2d2e8c584544d024b168cd6a1f8512eb8d77 (patch)
tree39f48175144fe2f9cb9f6994369af0a05e0fa85c
parentab65aa1a5a0379af7bfd672e40875c1e50bd4d12 (diff)
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
-rw-r--r--src/commands.cpp20
1 files changed, 11 insertions, 9 deletions
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);
}