mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-10 02:59:01 -04:00
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
This commit is contained in:
parent
ab65aa1a5a
commit
882c2d2e8c
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user