From: Alexander Barton Date: Tue, 31 Dec 2002 15:48:33 +0000 (+0000) Subject: - Fixed up bad test if we are still connected in KILL. X-Git-Tag: rel-0-6-1~21 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3da58202e63aeb9241600b77e3922616087be768;p=ngircd - Fixed up bad test if we are still connected in KILL. --- diff --git a/src/ngircd/irc.c b/src/ngircd/irc.c index b95805b4..8d02c4c3 100644 --- a/src/ngircd/irc.c +++ b/src/ngircd/irc.c @@ -14,7 +14,7 @@ #include "portab.h" -static char UNUSED id[] = "$Id: irc.c,v 1.107.2.2 2002/12/27 13:37:43 alex Exp $"; +static char UNUSED id[] = "$Id: irc.c,v 1.107.2.3 2002/12/31 15:48:33 alex Exp $"; #include "imp.h" #include @@ -52,7 +52,7 @@ IRC_KILL( CLIENT *Client, REQUEST *Req ) { CLIENT *prefix, *c; CHAR reason[COMMAND_LEN]; - CONN_ID conn; + CONN_ID my_conn, conn; assert( Client != NULL ); assert( Req != NULL ); @@ -79,6 +79,9 @@ IRC_KILL( CLIENT *Client, REQUEST *Req ) /* Inform other servers */ IRC_WriteStrServersPrefix( Client, prefix, "KILL %s :%s", Req->argv[0], reason ); + + /* Save ID of this connection */ + my_conn = Client_Conn( Client ); /* Do we host such a client? */ c = Client_Search( Req->argv[0] ); @@ -92,7 +95,7 @@ IRC_KILL( CLIENT *Client, REQUEST *Req ) else Log( LOG_NOTICE, "Client with nick \"%s\" is unknown here.", Req->argv[0] ); /* Are we still connected or were we killed, too? */ - if( Client_Search( Req->argv[0] )) return CONNECTED; + if( Client_GetFromConn( my_conn )) return CONNECTED; else return DISCONNECTED; } /* IRC_KILL */