Fixed anope module sending L tokens with 2 instead of 3 params (made code more tolerant instead of changing module)

git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1129 e03df62e-2008-0410-955e-edbf42e46eb7
This commit is contained in:
brain 2005-04-19 02:48:03 +00:00
parent 178e92cc0b
commit ab65aa1a5a

View File

@ -1967,12 +1967,24 @@ void handle_m(char token,char* params,serverrec* source,serverrec* reply, char*
void handle_L(char token,char* params,serverrec* source,serverrec* reply, char* tcp_host)
{
char* nick = strtok(params," ");
char* channel = strtok(NULL," :");
char* reason = strtok(NULL,"\r\n");
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
{
nick = strtok(params," ");
channel = strtok(NULL,"\r\n");
reason = "";
}
userrec* user = Find(nick);
reason++;
if (user)
if ((user) && (channel) && (reason))
{
if (strcmp(reason,""))
{