about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorAlexander Barton <alex@barton.de>2007-11-20 20:02:40 +0000
committerAlexander Barton <alex@barton.de>2007-11-20 20:02:40 +0000
commit53b98fd7e9173aec98a028535312eec82cddfeb9 (patch)
treeb9ac672ddf5fd792f3e91814f6c7054af3c453a7 /src
parentc7d4d856662ab63686edc796dbd3f6f0720e9bc0 (diff)
downloadngircd-53b98fd7e9173aec98a028535312eec82cddfeb9.tar.gz
ngircd-53b98fd7e9173aec98a028535312eec82cddfeb9.zip
Fixes the wrong logging output when nested servers are introduced
to the network as well as the wrong output of the LINKS command.
Diffstat (limited to 'src')
-rw-r--r--src/ngircd/irc-server.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/ngircd/irc-server.c b/src/ngircd/irc-server.c
index 41e89085..3fc0e2dc 100644
--- a/src/ngircd/irc-server.c
+++ b/src/ngircd/irc-server.c
@@ -1,6 +1,6 @@
 /*
  * ngIRCd -- The Next Generation IRC Daemon
- * Copyright (c)2001-2006 Alexander Barton (alex@barton.de)
+ * Copyright (c)2001-2007 Alexander Barton (alex@barton.de)
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -14,7 +14,7 @@
 
 #include "portab.h"
 
-static char UNUSED id[] = "$Id: irc-server.c,v 1.44 2007/11/18 15:05:35 alex Exp $";
+static char UNUSED id[] = "$Id: irc-server.c,v 1.45 2007/11/20 20:02:41 alex Exp $";
 
 #include "imp.h"
 #include <assert.h>
@@ -83,8 +83,6 @@ Synchronize_Lists( CLIENT *Client )
 #endif
 
 
-
-
 /**
  * Handler for the IRC command "SERVER".
  * See RFC 2813 section 4.1.2.
@@ -209,8 +207,13 @@ IRC_SERVER( CLIENT *Client, REQUEST *Req )
 						if( ! IRC_WriteStrClient( c, "SERVER %s %d %d :%s", Client_ID( Client ), Client_Hops( Client ) + 1, Client_MyToken( Client ), Client_Info( Client ))) return DISCONNECTED;
 					}
 					
-					/* Den neuen Server ueber den alten informieren */
-					if( ! IRC_WriteStrClientPrefix( Client, Client_Hops( c ) == 1 ? Client_ThisServer( ) : Client_Introducer( c ), "SERVER %s %d %d :%s", Client_ID( c ), Client_Hops( c ) + 1, Client_MyToken( c ), Client_Info( c ))) return DISCONNECTED;
+					/* Inform the new server about this one */
+					if (! IRC_WriteStrClientPrefix(Client,
+							Client_Hops(c) == 1 ? Client_ThisServer() : Client_TopServer(c),
+							"SERVER %s %d %d :%s",
+							Client_ID(c), Client_Hops(c) + 1,
+							Client_MyToken(c), Client_Info(c)))
+						return DISCONNECTED;
 				}
 				c = Client_Next( c );
 			}