mirror of
https://github.com/osmarks/ngircd.git
synced 2025-09-10 14:26:02 +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"
|
#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 "imp.h"
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
@@ -52,7 +52,7 @@ IRC_KILL( CLIENT *Client, REQUEST *Req )
|
|||||||
{
|
{
|
||||||
CLIENT *prefix, *c;
|
CLIENT *prefix, *c;
|
||||||
CHAR reason[COMMAND_LEN];
|
CHAR reason[COMMAND_LEN];
|
||||||
CONN_ID conn;
|
CONN_ID my_conn, conn;
|
||||||
|
|
||||||
assert( Client != NULL );
|
assert( Client != NULL );
|
||||||
assert( Req != NULL );
|
assert( Req != NULL );
|
||||||
@@ -80,6 +80,9 @@ IRC_KILL( CLIENT *Client, REQUEST *Req )
|
|||||||
/* Inform other servers */
|
/* Inform other servers */
|
||||||
IRC_WriteStrServersPrefix( Client, prefix, "KILL %s :%s", Req->argv[0], reason );
|
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? */
|
/* Do we host such a client? */
|
||||||
c = Client_Search( Req->argv[0] );
|
c = Client_Search( Req->argv[0] );
|
||||||
if( c && Client_Type( c ) == CLIENT_USER )
|
if( c && Client_Type( c ) == CLIENT_USER )
|
||||||
@@ -92,7 +95,7 @@ IRC_KILL( CLIENT *Client, REQUEST *Req )
|
|||||||
else Log( LOG_NOTICE, "Client with nick \"%s\" is unknown here.", Req->argv[0] );
|
else Log( LOG_NOTICE, "Client with nick \"%s\" is unknown here.", Req->argv[0] );
|
||||||
|
|
||||||
/* Are we still connected or were we killed, too? */
|
/* 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;
|
else return DISCONNECTED;
|
||||||
} /* IRC_KILL */
|
} /* IRC_KILL */
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user