- /* Ja, wir haben einen solchen Client */
- conn = Client_Conn( c );
- Client_Destroy( c, NULL, reason, FALSE );
- if( conn != NONE ) Conn_Close( Client_Conn( c ), NULL, reason, TRUE );
+ /* Yes, there is such a client -- but is it a valid user? */
+ if( Client_Type( c ) == CLIENT_SERVER ) IRC_WriteStrClient( prefix, ERR_CANTKILLSERVER_MSG, Client_ID( prefix ));
+ else if( Client_Type( c ) != CLIENT_USER )IRC_WriteStrClient( prefix, ERR_NOPRIVILEGES_MSG, Client_ID( prefix ));
+ else
+ {
+ /* Kill user NOW! */
+ conn = Client_Conn( c );
+ Client_Destroy( c, NULL, reason, FALSE );
+ if( conn != NONE ) Conn_Close( Client_Conn( c ), NULL, reason, TRUE );
+ }