mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-10 02:59:01 -04:00
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:
parent
178e92cc0b
commit
ab65aa1a5a
@ -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,""))
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user