- /* Kill user NOW! */
- conn = Client_Conn( c );
- Client_Destroy( c, NULL, reason, FALSE );
- if( conn != NONE ) Conn_Close( conn, NULL, reason, TRUE );
+ /* Target of this KILL is not a regular user, this is
+ * invalid! So we ignore this case if we received a
+ * regular KILL from the network and try to kill the
+ * client/connection anyway (but log an error!) if the
+ * origin is the local server. */
+
+ if( Client != Client_ThisServer( ))
+ {
+ /* Invalid KILL received from remote */
+ if( Client_Type( c ) == CLIENT_SERVER )
+ msg = ERR_CANTKILLSERVER_MSG;
+ else
+ msg = ERR_NOPRIVILEGES_MSG;
+ return IRC_WriteStrClient( Client, msg,
+ Client_ID( Client ));
+ }
+
+ Log( LOG_ERR, "Got KILL for invalid client type: %d, \"%s\"!",
+ Client_Type( c ), Req->argv[0] );