mirror of
https://github.com/osmarks/ngircd.git
synced 2025-09-07 05:07:56 +00:00
- Fixed up bad test if we are still connected in KILL.
This commit is contained in:
@@ -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 */
|
||||
|
||||
|
Reference in New Issue
Block a user