mirror of
https://github.com/osmarks/ngircd.git
synced 2024-12-12 09:50:29 +00:00
Don't forward KILLs to other servers if they've been blocked locally
This prevents clients from killing IRC services, for example. Closes #238. Closes #239.
This commit is contained in:
parent
c37d6971d6
commit
e009fc87d5
@ -362,11 +362,6 @@ IRC_KillClient(CLIENT *Client, CLIENT *From, const char *Nick, const char *Reaso
|
|||||||
return CONNECTED;
|
return CONNECTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Inform other servers */
|
|
||||||
IRC_WriteStrServersPrefix(From ? Client : NULL,
|
|
||||||
From ? From : Client_ThisServer(),
|
|
||||||
"KILL %s :%s", Nick, Reason);
|
|
||||||
|
|
||||||
if (Client_Type(c) != CLIENT_USER && Client_Type(c) != CLIENT_GOTNICK) {
|
if (Client_Type(c) != CLIENT_USER && Client_Type(c) != CLIENT_GOTNICK) {
|
||||||
/* Target of this KILL is not a regular user, this is
|
/* Target of this KILL is not a regular user, this is
|
||||||
* invalid! So we ignore this case if we received a
|
* invalid! So we ignore this case if we received a
|
||||||
@ -388,6 +383,12 @@ IRC_KillClient(CLIENT *Client, CLIENT *From, const char *Nick, const char *Reaso
|
|||||||
Client_Type(c), Nick);
|
Client_Type(c), Nick);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Inform other servers */
|
||||||
|
IRC_WriteStrServersPrefix(From ? Client : NULL,
|
||||||
|
From ? From : Client_ThisServer(),
|
||||||
|
"KILL %s :%s", Nick, Reason);
|
||||||
|
|
||||||
|
|
||||||
/* Save ID of this connection */
|
/* Save ID of this connection */
|
||||||
if (Client)
|
if (Client)
|
||||||
my_conn = Client_Conn(Client);
|
my_conn = Client_Conn(Client);
|
||||||
|
Loading…
Reference in New Issue
Block a user