]> arthur.barton.de Git - ngircd.git/commitdiff
- Fixed up bad test if we are still connected in KILL.
authorAlexander Barton <alex@barton.de>
Tue, 31 Dec 2002 15:48:33 +0000 (15:48 +0000)
committerAlexander Barton <alex@barton.de>
Tue, 31 Dec 2002 15:48:33 +0000 (15:48 +0000)
src/ngircd/irc.c

index b95805b4616edb3ed9394e3a223ac9288d161179..8d02c4c30e3ec08b9cead880b26e287ea23d895d 100644 (file)
@@ -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 <assert.h>
@@ -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 */