X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=ngircd-alex.git;a=blobdiff_plain;f=src%2Fngircd%2Firc-server.c;h=ec867ed84f28f06a7d3ce42adaf55cef4f54c2fa;hp=64c915378e979cd485a71276091c19490088a9f0;hb=4eb57b590bcf64c51583a58a4ebbef83dd79ea84;hpb=3dc16212003f3339f4b5d362c093bd831241c951 diff --git a/src/ngircd/irc-server.c b/src/ngircd/irc-server.c index 64c91537..ec867ed8 100644 --- a/src/ngircd/irc-server.c +++ b/src/ngircd/irc-server.c @@ -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.17 2002/09/07 17:57:31 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; @@ -188,7 +189,7 @@ IRC_SERVER( CLIENT *Client, REQUEST *Req ) if( strlen( str ) > ( LINE_LEN - CLIENT_NICK_LEN - 8 )) { /* Zeile senden */ - if( ! IRC_WriteStrClient( Client, str )) return DISCONNECTED; + if( ! IRC_WriteStrClient( Client, "%s", str )) return DISCONNECTED; sprintf( str, "NJOIN %s :", Channel_Name( chan )); } @@ -199,7 +200,7 @@ IRC_SERVER( CLIENT *Client, REQUEST *Req ) if( str[strlen( str ) - 1] != ':') { /* Ja; Also senden ... */ - if( ! IRC_WriteStrClient( Client, str )) return DISCONNECTED; + if( ! IRC_WriteStrClient( Client, "%s", str )) return DISCONNECTED; } /* naechsten Channel suchen */