From: Alexander Barton Date: Wed, 1 Jan 2003 13:29:40 +0000 (+0000) Subject: - Fixed up command forwarding: only to servers! X-Git-Tag: rel-0-7-0-pre1~118 X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=ngircd-alex.git;a=commitdiff_plain;h=ae6a7e7c0be06a19d8a46bc4a90b076879db814d - Fixed up command forwarding: only to servers! --- diff --git a/src/ngircd/irc-channel.c b/src/ngircd/irc-channel.c index 7c83ba0f..e5b912b4 100644 --- a/src/ngircd/irc-channel.c +++ b/src/ngircd/irc-channel.c @@ -14,7 +14,7 @@ #include "portab.h" -static char UNUSED id[] = "$Id: irc-channel.c,v 1.22 2002/12/26 17:04:54 alex Exp $"; +static char UNUSED id[] = "$Id: irc-channel.c,v 1.23 2003/01/01 13:29:40 alex Exp $"; #include "imp.h" #include @@ -326,7 +326,7 @@ IRC_LIST( CLIENT *Client, REQUEST *Req ) { /* an anderen Server forwarden */ target = Client_Search( Req->argv[1] ); - if( ! target ) return IRC_WriteStrClient( from, ERR_NOSUCHSERVER_MSG, Client_ID( Client ), Req->argv[1] ); + if(( ! target ) || ( Client_Type( target ) != CLIENT_SERVER )) return IRC_WriteStrClient( from, ERR_NOSUCHSERVER_MSG, Client_ID( Client ), Req->argv[1] ); if( target != Client_ThisServer( )) { diff --git a/src/ngircd/irc-login.c b/src/ngircd/irc-login.c index 04e6ef39..50ae8796 100644 --- a/src/ngircd/irc-login.c +++ b/src/ngircd/irc-login.c @@ -14,7 +14,7 @@ #include "portab.h" -static char UNUSED id[] = "$Id: irc-login.c,v 1.30 2002/12/30 17:15:42 alex Exp $"; +static char UNUSED id[] = "$Id: irc-login.c,v 1.31 2003/01/01 13:29:40 alex Exp $"; #include "imp.h" #include @@ -371,7 +371,7 @@ IRC_PING( CLIENT *Client, REQUEST *Req ) { /* es wurde ein Ziel-Client angegeben */ target = Client_Search( Req->argv[1] ); - if( ! target ) return IRC_WriteStrClient( Client, ERR_NOSUCHSERVER_MSG, Client_ID( Client ), Req->argv[1] ); + if(( ! target ) || ( Client_Type( target ) != CLIENT_SERVER )) return IRC_WriteStrClient( Client, ERR_NOSUCHSERVER_MSG, Client_ID( Client ), Req->argv[1] ); if( target != Client_ThisServer( )) { /* ok, forwarden */ @@ -403,7 +403,7 @@ IRC_PONG( CLIENT *Client, REQUEST *Req ) if( Req->argc == 2 ) { target = Client_Search( Req->argv[1] ); - if( ! target ) return IRC_WriteStrClient( Client, ERR_NOSUCHSERVER_MSG, Client_ID( Client ), Req->argv[1] ); + if(( ! target ) || ( Client_Type( target ) != CLIENT_SERVER )) return IRC_WriteStrClient( Client, ERR_NOSUCHSERVER_MSG, Client_ID( Client ), Req->argv[1] ); if( target != Client_ThisServer( )) { /* ok, forwarden */