]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/irc-server.c
- Fehler-Ausgaben verbessert (Prefix-Fehler).
[ngircd-alex.git] / src / ngircd / irc-server.c
index a9dde9ed15409267846fc63f61f1fa7dc2297691..ec867ed84f28f06a7d3ce42adaf55cef4f54c2fa 100644 (file)
@@ -9,7 +9,7 @@
  * Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
  * der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
  *
- * $Id: irc-server.c,v 1.18 2002/10/04 11:21:46 alex Exp $
+ * $Id: irc-server.c,v 1.20 2002/11/19 12:50:20 alex Exp $
  *
  * irc-server.c: IRC-Befehle fuer Server-Links
  */
@@ -71,10 +71,10 @@ IRC_SERVER( CLIENT *Client, REQUEST *Req )
                        Conn_Close( Client_Conn( Client ), NULL, "Server not configured here", TRUE );
                        return DISCONNECTED;
                }
-               if( strcmp( Client_Password( Client ), Conf_Server[i].pwd ) != 0 )
+               if( strcmp( Client_Password( Client ), Conf_Server[i].pwd_in ) != 0 )
                {
                        /* Falsches Passwort */
-                       Log( LOG_ERR, "Connection %d: Bad password for server \"%s\"!", Client_Conn( Client ), Req->argv[0] );
+                       Log( LOG_ERR, "Connection %d: Got bad password from server \"%s\"!", Client_Conn( Client ), Req->argv[0] );
                        Conn_Close( Client_Conn( Client ), NULL, "Bad password", TRUE );
                        return DISCONNECTED;
                }
@@ -93,7 +93,7 @@ IRC_SERVER( CLIENT *Client, REQUEST *Req )
                {
                        /* Eingehende Verbindung: Unseren SERVER- und PASS-Befehl senden */
                        ok = TRUE;
-                       if( ! IRC_WriteStrClient( Client, "PASS %s %s", Conf_Server[i].pwd, NGIRCd_ProtoID )) ok = FALSE;
+                       if( ! IRC_WriteStrClient( Client, "PASS %s %s", Conf_Server[i].pwd_out, NGIRCd_ProtoID )) ok = FALSE;
                        else ok = IRC_WriteStrClient( Client, "SERVER %s 1 :%s", Conf_ServerName, Conf_ServerInfo );
                        if( ! ok )
                        {
@@ -113,6 +113,7 @@ IRC_SERVER( CLIENT *Client, REQUEST *Req )
                Log( LOG_NOTICE|LOG_snotice, "Server \"%s\" registered (connection %d, 1 hop - direct link).", Client_ID( Client ), Client_Conn( Client ));
 
                Client_SetType( Client, CLIENT_SERVER );
+               Conn_SetServer( Client_Conn( Client ), i );
 
                /* maximalen Hop Count ermitteln */
                max_hops = 0;