* Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
* der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
*
- * $Id: conf.c,v 1.37 2002/11/18 18:47:42 alex Exp $
+ * $Id: conf.c,v 1.38 2002/11/19 12:50:20 alex Exp $
*
* conf.h: Konfiguration des ngircd
*/
printf( " Name = %s\n", Conf_Server[i].name );
printf( " Host = %s\n", Conf_Server[i].host );
printf( " Port = %d\n", Conf_Server[i].port );
- printf( " Password = %s\n", Conf_Server[i].pwd );
+ printf( " MyPassword = %s\n", Conf_Server[i].pwd_in );
+ printf( " PeerPassword = %s\n", Conf_Server[i].pwd_out );
printf( " Group = %d\n", Conf_Server[i].group );
puts( "" );
}
strcpy( Conf_Server[Conf_Server_Count].host, "" );
strcpy( Conf_Server[Conf_Server_Count].ip, "" );
strcpy( Conf_Server[Conf_Server_Count].name, "" );
- strcpy( Conf_Server[Conf_Server_Count].pwd, "" );
+ strcpy( Conf_Server[Conf_Server_Count].pwd_in, "" );
+ strcpy( Conf_Server[Conf_Server_Count].pwd_out, "" );
Conf_Server[Conf_Server_Count].port = 0;
Conf_Server[Conf_Server_Count].group = -1;
Conf_Server[Conf_Server_Count].lasttry = time( NULL ) - Conf_ConnectRetry + STARTUP_DELAY;
Conf_Server[Conf_Server_Count - 1].name[CLIENT_ID_LEN - 1] = '\0';
return;
}
- if( strcasecmp( Var, "Password" ) == 0 )
+ if( strcasecmp( Var, "MyPassword" ) == 0 )
{
- /* Passwort des Servers */
- strncpy( Conf_Server[Conf_Server_Count - 1].pwd, Arg, CLIENT_PASS_LEN - 1 );
- Conf_Server[Conf_Server_Count - 1].pwd[CLIENT_PASS_LEN - 1] = '\0';
+ /* Passwort dieses Servers, welches empfangen werden muss */
+ strncpy( Conf_Server[Conf_Server_Count - 1].pwd_in, Arg, CLIENT_PASS_LEN - 1 );
+ Conf_Server[Conf_Server_Count - 1].pwd_in[CLIENT_PASS_LEN - 1] = '\0';
+ return;
+ }
+ if( strcasecmp( Var, "PeerPassword" ) == 0 )
+ {
+ /* Passwort des anderen Servers, welches gesendet werden muss */
+ strncpy( Conf_Server[Conf_Server_Count - 1].pwd_out, Arg, CLIENT_PASS_LEN - 1 );
+ Conf_Server[Conf_Server_Count - 1].pwd_out[CLIENT_PASS_LEN - 1] = '\0';
return;
}
if( strcasecmp( Var, "Port" ) == 0 )
* Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
* der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
*
- * $Id: conf.h,v 1.20 2002/11/02 22:58:41 alex Exp $
+ * $Id: conf.h,v 1.21 2002/11/19 12:50:20 alex Exp $
*
* conf.h: Konfiguration des ngircd (Header)
*/
CHAR host[HOST_LEN]; /* Hostname */
CHAR ip[16]; /* IP-Adresse (von Resolver) */
CHAR name[CLIENT_ID_LEN]; /* IRC-Client-ID */
- CHAR pwd[CLIENT_PASS_LEN]; /* Passwort */
+ CHAR pwd_in[CLIENT_PASS_LEN]; /* Passwort, welches erwartet wird */
+ CHAR pwd_out[CLIENT_PASS_LEN]; /* An die Gegenseite zu sendendes Passwort */
INT port; /* Server-Port */
INT group; /* Gruppe des Servers */
time_t lasttry; /* Letzter Connect-Versuch */
* Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
* der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
*
- * $Id: conn.c,v 1.89 2002/11/11 00:54:25 alex Exp $
+ * $Id: conn.c,v 1.90 2002/11/19 12:50:20 alex Exp $
*
* connect.h: Verwaltung aller Netz-Verbindungen ("connections")
*/
Log( LOG_DEBUG, "Connection %d with \"%s:%d\" established, now sendig PASS and SERVER ...", Idx, My_Connections[Idx].host, Conf_Server[My_Connections[Idx].our_server].port );
/* PASS und SERVER verschicken */
- Conn_WriteStr( Idx, "PASS %s %s", Conf_Server[My_Connections[Idx].our_server].pwd, NGIRCd_ProtoID );
+ Conn_WriteStr( Idx, "PASS %s %s", Conf_Server[My_Connections[Idx].our_server].pwd_out, NGIRCd_ProtoID );
return Conn_WriteStr( Idx, "SERVER %s :%s", Conf_ServerName, Conf_ServerInfo );
}
* 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.19 2002/11/05 14:18:59 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
*/
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;
}
{
/* 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 )
{