mirror of
https://github.com/osmarks/ngircd.git
synced 2025-01-31 17:49:11 +00:00
Don't forward KILL commands for unknown clients
This commit is contained in:
parent
b5faf3055b
commit
02182143c3
@ -346,18 +346,18 @@ IRC_KillClient(CLIENT *Client, CLIENT *From, const char *Nick, const char *Reaso
|
|||||||
CONN_ID my_conn, conn;
|
CONN_ID my_conn, conn;
|
||||||
CLIENT *c;
|
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 */
|
/* Inform other servers */
|
||||||
IRC_WriteStrServersPrefix(From ? Client : NULL,
|
IRC_WriteStrServersPrefix(From ? Client : NULL,
|
||||||
From ? From : Client_ThisServer(),
|
From ? From : Client_ThisServer(),
|
||||||
"KILL %s :%s", Nick, Reason);
|
"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) {
|
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
|
||||||
|
Loading…
Reference in New Issue
Block a user