]> arthur.barton.de Git - ngircd-alex.git/commitdiff
- Fixed up command forwarding: only to servers!
authorAlexander Barton <alex@barton.de>
Wed, 1 Jan 2003 13:29:40 +0000 (13:29 +0000)
committerAlexander Barton <alex@barton.de>
Wed, 1 Jan 2003 13:29:40 +0000 (13:29 +0000)
src/ngircd/irc-channel.c
src/ngircd/irc-login.c

index 7c83ba0fcaec1db02eacbdde0067e1efa559c41d..e5b912b4eb62110bb35bab850db731eda9f62f17 100644 (file)
@@ -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 <assert.h>
@@ -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( ))
                {
index 04e6ef392d8aa7ce059b041932d9ad54eedc37d6..50ae87963db4449eabf5e6fbbc5e8171a483d833 100644 (file)
@@ -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 <assert.h>
@@ -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 */