From ae6a7e7c0be06a19d8a46bc4a90b076879db814d Mon Sep 17 00:00:00 2001 From: Alexander Barton Date: Wed, 1 Jan 2003 13:29:40 +0000 Subject: [PATCH] - Fixed up command forwarding: only to servers! --- src/ngircd/irc-channel.c | 4 ++-- src/ngircd/irc-login.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) 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 */