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:
brain 2005-04-19 03:13:29 +00:00
parent ab65aa1a5a
commit 882c2d2e8c

View File

@ -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);
}