1
0
mirror of https://github.com/osmarks/ngircd.git synced 2025-01-19 03:52:52 +00:00

Don't forward KILL commands for unknown clients

This commit is contained in:
Alexander Barton 2013-09-26 02:58:01 +02:00
parent b5faf3055b
commit 02182143c3

View File

@ -346,18 +346,18 @@ IRC_KillClient(CLIENT *Client, CLIENT *From, const char *Nick, const char *Reaso
CONN_ID my_conn, conn;
CLIENT *c;
/* Do we know such a client in the network? */
c = Client_Search(Nick);
if (!c) {
LogDebug("Client with nick \"%s\" is unknown, not forwaring.", Nick);
return CONNECTED;
}
/* Inform other servers */
IRC_WriteStrServersPrefix(From ? Client : NULL,
From ? From : Client_ThisServer(),
"KILL %s :%s", Nick, Reason);
/* Do we know such a client? */
c = Client_Search(Nick);
if (!c) {
LogDebug("Client with nick \"%s\" is unknown here.", Nick);
return CONNECTED;
}
if (Client_Type(c) != CLIENT_USER && Client_Type(c) != CLIENT_GOTNICK) {
/* Target of this KILL is not a regular user, this is
* invalid! So we ignore this case if we received a