mirror of
https://github.com/osmarks/ngircd.git
synced 2025-01-14 09:35:41 +00:00
- Weitere Anpassungen an pre-ANSI-Compiler.
This commit is contained in:
parent
e74ee37db5
commit
f7327524fc
@ -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: channel.c,v 1.23 2002/05/27 13:09:26 alex Exp $
|
||||
* $Id: channel.c,v 1.24 2002/05/30 16:52:21 alex Exp $
|
||||
*
|
||||
* channel.c: Management der Channels
|
||||
*/
|
||||
@ -345,15 +345,16 @@ Channel_GetChannel( CL2CHAN *Cl2Chan )
|
||||
GLOBAL BOOLEAN
|
||||
Channel_IsValidName( CHAR *Name )
|
||||
{
|
||||
/* PrŸfen, ob Name als Channelname gueltig */
|
||||
/* Pruefen, ob Name als Channelname gueltig */
|
||||
|
||||
CHAR *ptr, badchars[] = " ,:\x07";
|
||||
CHAR *ptr, badchars[10];
|
||||
|
||||
assert( Name != NULL );
|
||||
|
||||
if(( Name[0] != '#' ) || ( strlen( Name ) >= CHANNEL_NAME_LEN )) return FALSE;
|
||||
|
||||
ptr = Name;
|
||||
strcpy( badchars, " ,:\x07" );
|
||||
while( *ptr )
|
||||
{
|
||||
if( strchr( badchars, *ptr )) return FALSE;
|
||||
|
@ -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: client.c,v 1.55 2002/05/27 13:09:26 alex Exp $
|
||||
* $Id: client.c,v 1.56 2002/05/30 16:52:21 alex Exp $
|
||||
*
|
||||
* client.c: Management aller Clients
|
||||
*
|
||||
@ -73,7 +73,7 @@ Client_Init( VOID )
|
||||
if( ! This_Server )
|
||||
{
|
||||
Log( LOG_EMERG, "Can't allocate client structure for server! Going down." );
|
||||
Log( LOG_ALERT, PACKAGE" exiting due to fatal errors!" );
|
||||
Log( LOG_ALERT, "%s exiting due to fatal errors!", PACKAGE );
|
||||
exit( 1 );
|
||||
}
|
||||
|
||||
@ -906,10 +906,12 @@ Client_IsValidNick( CHAR *Nick )
|
||||
{
|
||||
/* Ist der Nick gueltig? */
|
||||
|
||||
CHAR *ptr, goodchars[] = ";0123456789-";
|
||||
CHAR *ptr, goodchars[20];
|
||||
|
||||
assert( Nick != NULL );
|
||||
|
||||
strcpy( goodchars, ";0123456789-" );
|
||||
|
||||
if( Nick[0] == '#' ) return FALSE;
|
||||
if( strchr( goodchars, Nick[0] )) return FALSE;
|
||||
if( strlen( Nick ) >= CLIENT_NICK_LEN ) return FALSE;
|
||||
|
@ -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: conf.c,v 1.26 2002/05/27 13:09:26 alex Exp $
|
||||
* $Id: conf.c,v 1.27 2002/05/30 16:52:21 alex Exp $
|
||||
*
|
||||
* conf.h: Konfiguration des ngircd
|
||||
*/
|
||||
@ -150,7 +150,7 @@ Set_Defaults( VOID )
|
||||
/* Konfigurationsvariablen initialisieren, d.h. auf Default-Werte setzen. */
|
||||
|
||||
strcpy( Conf_ServerName, "" );
|
||||
strcpy( Conf_ServerInfo, PACKAGE" "VERSION );
|
||||
sprintf( Conf_ServerInfo, "%s %s", PACKAGE, VERSION );
|
||||
strcpy( Conf_ServerPwd, "" );
|
||||
|
||||
strcpy( Conf_MotdFile, MOTD_FILE );
|
||||
@ -184,7 +184,7 @@ Read_Config( VOID )
|
||||
{
|
||||
/* Keine Konfigurationsdatei gefunden */
|
||||
Config_Error( LOG_ALERT, "Can't read configuration \"%s\": %s", NGIRCd_ConfFile, strerror( errno ));
|
||||
Config_Error( LOG_ALERT, PACKAGE" exiting due to fatal errors!" );
|
||||
Config_Error( LOG_ALERT, "%s exiting due to fatal errors!", PACKAGE );
|
||||
exit( 1 );
|
||||
}
|
||||
|
||||
@ -494,14 +494,20 @@ Validate_Config( VOID )
|
||||
{
|
||||
/* Kein Servername konfiguriert */
|
||||
Config_Error( LOG_ALERT, "No server name configured in \"%s\"!", NGIRCd_ConfFile );
|
||||
Config_Error( LOG_ALERT, PACKAGE" exiting due to fatal errors!" );
|
||||
Config_Error( LOG_ALERT, "%s exiting due to fatal errors!", PACKAGE );
|
||||
exit( 1 );
|
||||
}
|
||||
} /* Validate_Config */
|
||||
|
||||
|
||||
LOCAL VOID
|
||||
Config_Error( CONST INT Level, CONST CHAR *Format, ... )
|
||||
#ifdef PROTOTYPES
|
||||
LOCAL VOID Config_Error( CONST INT Level, CONST CHAR *Format, ... )
|
||||
#else
|
||||
LOCAL VOID Config_Error( Level, Format, va_alist )
|
||||
CONST INT Level;
|
||||
CONST CHAR *Format;
|
||||
va_dcl
|
||||
#endif
|
||||
{
|
||||
/* Fehler! Auf Console und/oder ins Log schreiben */
|
||||
|
||||
@ -511,7 +517,11 @@ Config_Error( CONST INT Level, CONST CHAR *Format, ... )
|
||||
assert( Format != NULL );
|
||||
|
||||
/* String mit variablen Argumenten zusammenbauen ... */
|
||||
#ifdef PROTOTYPES
|
||||
va_start( ap, Format );
|
||||
#else
|
||||
va_start( ap );
|
||||
#endif
|
||||
vsnprintf( msg, MAX_LOG_MSG_LEN, Format, ap );
|
||||
va_end( ap );
|
||||
|
||||
|
@ -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: conn.c,v 1.65 2002/05/27 13:09:26 alex Exp $
|
||||
* $Id: conn.c,v 1.66 2002/05/30 16:52:21 alex Exp $
|
||||
*
|
||||
* connect.h: Verwaltung aller Netz-Verbindungen ("connections")
|
||||
*/
|
||||
@ -298,7 +298,7 @@ Conn_Handler( INT Timeout )
|
||||
if( errno != EINTR )
|
||||
{
|
||||
Log( LOG_EMERG, "select(): %s!", strerror( errno ));
|
||||
Log( LOG_ALERT, PACKAGE" exiting due to fatal errors!" );
|
||||
Log( LOG_ALERT, "%s exiting due to fatal errors!", PACKAGE );
|
||||
exit( 1 );
|
||||
}
|
||||
continue;
|
||||
@ -319,8 +319,16 @@ Conn_Handler( INT Timeout )
|
||||
} /* Conn_Handler */
|
||||
|
||||
|
||||
#ifdef PROTOTYPES
|
||||
GLOBAL BOOLEAN
|
||||
Conn_WriteStr( CONN_ID Idx, CHAR *Format, ... )
|
||||
#else
|
||||
GLOBAL BOOLEAN
|
||||
Conn_WriteStr( Idx, Format, va_alist )
|
||||
CONN_ID Idx;
|
||||
CHAR *Format;
|
||||
va_dcl
|
||||
#endif
|
||||
{
|
||||
/* String in Socket schreiben. CR+LF wird von dieser Funktion
|
||||
* automatisch angehaengt. Im Fehlerfall wird dir Verbindung
|
||||
@ -333,8 +341,12 @@ Conn_WriteStr( CONN_ID Idx, CHAR *Format, ... )
|
||||
assert( Idx >= 0 );
|
||||
assert( My_Connections[Idx].sock > NONE );
|
||||
assert( Format != NULL );
|
||||
|
||||
|
||||
#ifdef PROTOTYPES
|
||||
va_start( ap, Format );
|
||||
#else
|
||||
va_start( ap );
|
||||
#endif
|
||||
if( vsnprintf( buffer, COMMAND_LEN - 2, Format, ap ) == COMMAND_LEN - 2 )
|
||||
{
|
||||
Log( LOG_CRIT, "Text too long to send (connection %d)!", Idx );
|
||||
@ -586,7 +598,7 @@ Handle_Write( CONN_ID Idx )
|
||||
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 "PASSSERVERADD, Conf_Server[My_Connections[Idx].our_server].pwd );
|
||||
Conn_WriteStr( Idx, "PASS %s %s", Conf_Server[My_Connections[Idx].our_server].pwd, PASSSERVERADD );
|
||||
Conn_WriteStr( Idx, "SERVER %s :%s", Conf_ServerName, Conf_ServerInfo );
|
||||
|
||||
return TRUE;
|
||||
|
@ -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: defines.h,v 1.25 2002/05/27 13:04:07 alex Exp $
|
||||
* $Id: defines.h,v 1.26 2002/05/30 16:52:21 alex Exp $
|
||||
*
|
||||
* defines.h: (globale) Konstanten
|
||||
*/
|
||||
@ -58,7 +58,11 @@
|
||||
#define PROTOVER "0210" /* implementierte Protokoll-Version (RFC 2813, 4.1.1) */
|
||||
#define PROTOSUFFIX "-ngIRCd" /* Protokoll-Suffix (RFC 2813, 4.1.1) */
|
||||
|
||||
#define PASSSERVERADD PROTOVER""PROTOSUFFIX" IRC|"PACKAGE"-"VERSION" P"
|
||||
#ifdef PROTOTYPES
|
||||
# define PASSSERVERADD PROTOVER""PROTOSUFFIX" IRC|"PACKAGE"-"VERSION" P"
|
||||
#else
|
||||
# define PASSSERVERADD "0210-ngIRCd IRC|ngircd-0 P"
|
||||
#endif
|
||||
|
||||
#define STARTUP_DELAY 1 /* Erst n Sek. nach Start zu anderen Servern verbinden */
|
||||
#define RECONNECT_DELAY 3 /* Server-Links erst nach 3 Sekunden versuchen, wieder aufzubauen */
|
||||
@ -71,8 +75,13 @@
|
||||
|
||||
#define DEFAULT_AWAY_MSG "Away" /* Away-Meldung fuer User von anderen Servern */
|
||||
|
||||
#define CONFIG_FILE SYSCONFDIR"/ngircd.conf"
|
||||
#define MOTD_FILE SYSCONFDIR"/ngircd.motd"
|
||||
#ifdef PROTOTYPES
|
||||
# define CONFIG_FILE SYSCONFDIR"/ngircd.conf"
|
||||
# define MOTD_FILE SYSCONFDIR"/ngircd.motd"
|
||||
#else
|
||||
# define CONFIG_FILE "ngircd.conf"
|
||||
# define MOTD_FILE "ngircd.motd"
|
||||
#endif
|
||||
#define ERROR_DIR "/tmp"
|
||||
|
||||
#define MAX_LOG_MSG_LEN 256 /* max. Laenge einer Log-Meldung */
|
||||
|
@ -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-login.c,v 1.14 2002/05/27 13:09:26 alex Exp $
|
||||
* $Id: irc-login.c,v 1.15 2002/05/30 16:52:21 alex Exp $
|
||||
*
|
||||
* irc-login.c: Anmeldung und Abmeldung im IRC
|
||||
*/
|
||||
@ -391,9 +391,9 @@ Hello_User( CLIENT *Client )
|
||||
IRC_WriteStrServers( NULL, "NICK %s 1 %s %s 1 +%s :%s", Client_ID( Client ), Client_User( Client ), Client_Hostname( Client ), Client_Modes( Client ), Client_Info( Client ));
|
||||
|
||||
if( ! IRC_WriteStrClient( Client, RPL_WELCOME_MSG, Client_ID( Client ), Client_Mask( Client ))) return FALSE;
|
||||
if( ! IRC_WriteStrClient( Client, RPL_YOURHOST_MSG, Client_ID( Client ), Client_ID( Client_ThisServer( )))) return FALSE;
|
||||
if( ! IRC_WriteStrClient( Client, RPL_YOURHOST_MSG, Client_ID( Client ), Client_ID( Client_ThisServer( )), VERSION, TARGET_CPU, TARGET_CPU, TARGET_OS )) return FALSE;
|
||||
if( ! IRC_WriteStrClient( Client, RPL_CREATED_MSG, Client_ID( Client ), NGIRCd_StartStr )) return FALSE;
|
||||
if( ! IRC_WriteStrClient( Client, RPL_MYINFO_MSG, Client_ID( Client ), Client_ID( Client_ThisServer( )))) return FALSE;
|
||||
if( ! IRC_WriteStrClient( Client, RPL_MYINFO_MSG, Client_ID( Client ), Client_ID( Client_ThisServer( )), VERSION, USERMODES, CHANMODES )) return FALSE;
|
||||
|
||||
Client_SetType( Client, CLIENT_USER );
|
||||
|
||||
|
@ -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.10 2002/05/27 13:09:27 alex Exp $
|
||||
* $Id: irc-server.c,v 1.11 2002/05/30 16:52:21 alex Exp $
|
||||
*
|
||||
* irc-server.c: IRC-Befehle fuer Server-Links
|
||||
*/
|
||||
@ -92,7 +92,7 @@ IRC_SERVER( CLIENT *Client, REQUEST *Req )
|
||||
{
|
||||
/* Eingehende Verbindung: Unseren SERVER- und PASS-Befehl senden */
|
||||
ok = TRUE;
|
||||
if( ! IRC_WriteStrClient( Client, "PASS %s "PASSSERVERADD, Conf_Server[i].pwd )) ok = FALSE;
|
||||
if( ! IRC_WriteStrClient( Client, "PASS %s %s", Conf_Server[i].pwd, PASSSERVERADD )) ok = FALSE;
|
||||
else ok = IRC_WriteStrClient( Client, "SERVER %s 1 :%s", Conf_ServerName, Conf_ServerInfo );
|
||||
if( ! ok )
|
||||
{
|
||||
|
@ -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-write.c,v 1.4 2002/05/27 13:09:27 alex Exp $
|
||||
* $Id: irc-write.c,v 1.5 2002/05/30 16:52:21 alex Exp $
|
||||
*
|
||||
* irc-write.c: IRC-Texte und Befehle ueber Netzwerk versenden
|
||||
*/
|
||||
@ -34,8 +34,16 @@
|
||||
LOCAL CHAR *Get_Prefix PARAMS(( CLIENT *Target, CLIENT *Client ));
|
||||
|
||||
|
||||
#ifdef PROTOTYPES
|
||||
GLOBAL BOOLEAN
|
||||
IRC_WriteStrClient( CLIENT *Client, CHAR *Format, ... )
|
||||
#else
|
||||
GLOBAL BOOLEAN
|
||||
IRC_WriteStrClient( Client, Format, va_alist )
|
||||
CLIENT *Client;
|
||||
CHAR *Format;
|
||||
va_dcl
|
||||
#endif
|
||||
{
|
||||
CHAR buffer[1000];
|
||||
BOOLEAN ok = CONNECTED;
|
||||
@ -44,7 +52,11 @@ IRC_WriteStrClient( CLIENT *Client, CHAR *Format, ... )
|
||||
assert( Client != NULL );
|
||||
assert( Format != NULL );
|
||||
|
||||
#ifdef PROTOTYPES
|
||||
va_start( ap, Format );
|
||||
#else
|
||||
va_start( ap );
|
||||
#endif
|
||||
vsnprintf( buffer, 1000, Format, ap );
|
||||
va_end( ap );
|
||||
|
||||
@ -55,8 +67,17 @@ IRC_WriteStrClient( CLIENT *Client, CHAR *Format, ... )
|
||||
} /* IRC_WriteStrClient */
|
||||
|
||||
|
||||
#ifdef PROTOTYPES
|
||||
GLOBAL BOOLEAN
|
||||
IRC_WriteStrClientPrefix( CLIENT *Client, CLIENT *Prefix, CHAR *Format, ... )
|
||||
#else
|
||||
GLOBAL BOOLEAN
|
||||
IRC_WriteStrClientPrefix( Client, Prefix, Format, va_alist )
|
||||
CLIENT *Client;
|
||||
CLIENT *Prefix;
|
||||
CHAR *Format;
|
||||
va_dcl
|
||||
#endif
|
||||
{
|
||||
/* Text an Clients, lokal bzw. remote, senden. */
|
||||
|
||||
@ -67,7 +88,11 @@ IRC_WriteStrClientPrefix( CLIENT *Client, CLIENT *Prefix, CHAR *Format, ... )
|
||||
assert( Format != NULL );
|
||||
assert( Prefix != NULL );
|
||||
|
||||
#ifdef PROTOTYPES
|
||||
va_start( ap, Format );
|
||||
#else
|
||||
va_start( ap );
|
||||
#endif
|
||||
vsnprintf( buffer, 1000, Format, ap );
|
||||
va_end( ap );
|
||||
|
||||
@ -75,8 +100,18 @@ IRC_WriteStrClientPrefix( CLIENT *Client, CLIENT *Prefix, CHAR *Format, ... )
|
||||
} /* IRC_WriteStrClientPrefix */
|
||||
|
||||
|
||||
#ifdef PROTOTYPES
|
||||
GLOBAL BOOLEAN
|
||||
IRC_WriteStrChannel( CLIENT *Client, CHANNEL *Chan, BOOLEAN Remote, CHAR *Format, ... )
|
||||
#else
|
||||
GLOBAL BOOLEAN
|
||||
IRC_WriteStrChannel( Client, Chan, Remote, Format, va_alist )
|
||||
CLIENT *Client;
|
||||
CHANNEL *Chan;
|
||||
BOOLEAN Remote;
|
||||
CHAR *Format;
|
||||
va_dcl
|
||||
#endif
|
||||
{
|
||||
CHAR buffer[1000];
|
||||
va_list ap;
|
||||
@ -84,7 +119,11 @@ IRC_WriteStrChannel( CLIENT *Client, CHANNEL *Chan, BOOLEAN Remote, CHAR *Format
|
||||
assert( Client != NULL );
|
||||
assert( Format != NULL );
|
||||
|
||||
#ifdef PROTOTYPES
|
||||
va_start( ap, Format );
|
||||
#else
|
||||
va_start( ap );
|
||||
#endif
|
||||
vsnprintf( buffer, 1000, Format, ap );
|
||||
va_end( ap );
|
||||
|
||||
@ -92,8 +131,19 @@ IRC_WriteStrChannel( CLIENT *Client, CHANNEL *Chan, BOOLEAN Remote, CHAR *Format
|
||||
} /* IRC_WriteStrChannel */
|
||||
|
||||
|
||||
#ifdef PROTOTYPES
|
||||
GLOBAL BOOLEAN
|
||||
IRC_WriteStrChannelPrefix( CLIENT *Client, CHANNEL *Chan, CLIENT *Prefix, BOOLEAN Remote, CHAR *Format, ... )
|
||||
#else
|
||||
GLOBAL BOOLEAN
|
||||
IRC_WriteStrChannelPrefix( Client, Chan, Prefix, Remote, Format, va_alist )
|
||||
CLIENT *Client;
|
||||
CHANNEL *Chan;
|
||||
CLIENT *Prefix;
|
||||
BOOLEAN Remote;
|
||||
CHAR *Format;
|
||||
va_dcl
|
||||
#endif
|
||||
{
|
||||
BOOLEAN sock[MAX_CONNECTIONS], is_server[MAX_CONNECTIONS], ok = CONNECTED;
|
||||
CHAR buffer[1000];
|
||||
@ -107,7 +157,11 @@ IRC_WriteStrChannelPrefix( CLIENT *Client, CHANNEL *Chan, CLIENT *Prefix, BOOLEA
|
||||
assert( Prefix != NULL );
|
||||
assert( Format != NULL );
|
||||
|
||||
#ifdef PROTOTYPES
|
||||
va_start( ap, Format );
|
||||
#else
|
||||
va_start( ap );
|
||||
#endif
|
||||
vsnprintf( buffer, 1000, Format, ap );
|
||||
va_end( ap );
|
||||
|
||||
@ -153,25 +207,46 @@ IRC_WriteStrChannelPrefix( CLIENT *Client, CHANNEL *Chan, CLIENT *Prefix, BOOLEA
|
||||
} /* IRC_WriteStrChannelPrefix */
|
||||
|
||||
|
||||
#ifdef PROTOTYPES
|
||||
GLOBAL VOID
|
||||
IRC_WriteStrServers( CLIENT *ExceptOf, CHAR *Format, ... )
|
||||
#else
|
||||
GLOBAL VOID
|
||||
IRC_WriteStrServers( ExceptOf, Format, va_alist )
|
||||
CLIENT *ExceptOf;
|
||||
CHAR *Format;
|
||||
va_dcl
|
||||
#endif
|
||||
{
|
||||
CHAR buffer[1000];
|
||||
va_list ap;
|
||||
|
||||
assert( Format != NULL );
|
||||
|
||||
#ifdef PROTOTYPES
|
||||
va_start( ap, Format );
|
||||
#else
|
||||
va_start( ap );
|
||||
#endif
|
||||
vsnprintf( buffer, 1000, Format, ap );
|
||||
va_end( ap );
|
||||
|
||||
/* an den Client selber */
|
||||
return IRC_WriteStrServersPrefix( ExceptOf, Client_ThisServer( ), buffer );
|
||||
IRC_WriteStrServersPrefix( ExceptOf, Client_ThisServer( ), buffer );
|
||||
} /* IRC_WriteStrServers */
|
||||
|
||||
|
||||
#ifdef PROTOTYPES
|
||||
GLOBAL VOID
|
||||
IRC_WriteStrServersPrefix( CLIENT *ExceptOf, CLIENT *Prefix, CHAR *Format, ... )
|
||||
#else
|
||||
GLOBAL VOID
|
||||
IRC_WriteStrServersPrefix( ExceptOf, Prefix, Format, va_alist )
|
||||
CLIENT *ExceptOf;
|
||||
CLIENT *Prefix;
|
||||
CHAR *Format;
|
||||
va_dcl
|
||||
#endif
|
||||
{
|
||||
CHAR buffer[1000];
|
||||
CLIENT *c;
|
||||
@ -180,7 +255,11 @@ IRC_WriteStrServersPrefix( CLIENT *ExceptOf, CLIENT *Prefix, CHAR *Format, ... )
|
||||
assert( Format != NULL );
|
||||
assert( Prefix != NULL );
|
||||
|
||||
#ifdef PROTOTYPES
|
||||
va_start( ap, Format );
|
||||
#else
|
||||
va_start( ap );
|
||||
#endif
|
||||
vsnprintf( buffer, 1000, Format, ap );
|
||||
va_end( ap );
|
||||
|
||||
@ -197,8 +276,18 @@ IRC_WriteStrServersPrefix( CLIENT *ExceptOf, CLIENT *Prefix, CHAR *Format, ... )
|
||||
} /* IRC_WriteStrServersPrefix */
|
||||
|
||||
|
||||
#ifdef PROTOTYPES
|
||||
GLOBAL BOOLEAN
|
||||
IRC_WriteStrRelatedPrefix( CLIENT *Client, CLIENT *Prefix, BOOLEAN Remote, CHAR *Format, ... )
|
||||
#else
|
||||
GLOBAL BOOLEAN
|
||||
IRC_WriteStrRelatedPrefix( Client, Prefix, Remote, Format, va_alist )
|
||||
CLIENT *Client;
|
||||
CLIENT *Prefix;
|
||||
BOOLEAN Remote;
|
||||
CHAR *Format;
|
||||
va_dcl
|
||||
#endif
|
||||
{
|
||||
BOOLEAN sock[MAX_CONNECTIONS], is_server[MAX_CONNECTIONS], ok = CONNECTED;
|
||||
CL2CHAN *chan_cl2chan, *cl2chan;
|
||||
@ -212,7 +301,11 @@ IRC_WriteStrRelatedPrefix( CLIENT *Client, CLIENT *Prefix, BOOLEAN Remote, CHAR
|
||||
assert( Prefix != NULL );
|
||||
assert( Format != NULL );
|
||||
|
||||
#ifdef PROTOTYPES
|
||||
va_start( ap, Format );
|
||||
#else
|
||||
va_start( ap );
|
||||
#endif
|
||||
vsnprintf( buffer, 1000, Format, ap );
|
||||
va_end( ap );
|
||||
|
||||
|
@ -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.c,v 1.90 2002/05/27 13:09:27 alex Exp $
|
||||
* $Id: irc.c,v 1.91 2002/05/30 16:52:21 alex Exp $
|
||||
*
|
||||
* irc.c: IRC-Befehle
|
||||
*/
|
||||
@ -609,7 +609,7 @@ IRC_VERSION( CLIENT *Client, REQUEST *Req )
|
||||
}
|
||||
|
||||
/* mit Versionsinfo antworten */
|
||||
return IRC_WriteStrClient( Client, RPL_VERSION_MSG, Client_ID( prefix ), NGIRCd_DebugLevel, Conf_ServerName, NGIRCd_VersionAddition( ));
|
||||
return IRC_WriteStrClient( Client, RPL_VERSION_MSG, Client_ID( prefix ), PACKAGE, VERSION, NGIRCd_DebugLevel, Conf_ServerName, NGIRCd_VersionAddition( ));
|
||||
} /* IRC_VERSION */
|
||||
|
||||
|
||||
|
@ -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: log.c,v 1.33 2002/05/27 13:09:27 alex Exp $
|
||||
* $Id: log.c,v 1.34 2002/05/30 16:52:21 alex Exp $
|
||||
*
|
||||
* log.c: Logging-Funktionen
|
||||
*/
|
||||
@ -96,7 +96,7 @@ Log_InitErrorfile( VOID )
|
||||
* landen z.B. alle Ausgaben von assert()-Aufrufen. */
|
||||
|
||||
/* Dateiname zusammen bauen */
|
||||
sprintf( Error_File, ERROR_DIR"/"PACKAGE"-%ld.err", (INT32)getpid( ));
|
||||
sprintf( Error_File, "%s/%s-%ld.err", ERROR_DIR, PACKAGE, (INT32)getpid( ));
|
||||
|
||||
/* stderr umlenken */
|
||||
fflush( stderr );
|
||||
@ -120,7 +120,7 @@ GLOBAL VOID
|
||||
Log_Exit( VOID )
|
||||
{
|
||||
/* Good Bye! */
|
||||
Log( LOG_NOTICE, PACKAGE" done.");
|
||||
Log( LOG_NOTICE, "%s done.", PACKAGE );
|
||||
|
||||
/* Error-File (stderr) loeschen */
|
||||
if( unlink( Error_File ) != 0 ) Log( LOG_ERR, "Can't delete \"%s\": %s", Error_File, strerror( errno ));
|
||||
@ -132,8 +132,16 @@ Log_Exit( VOID )
|
||||
} /* Log_Exit */
|
||||
|
||||
|
||||
#ifdef PROTOTYPES
|
||||
GLOBAL VOID
|
||||
Log( INT Level, CONST CHAR *Format, ... )
|
||||
#else
|
||||
GLOBAL VOID
|
||||
Log( Level, Format, va_alist )
|
||||
INT Level;
|
||||
CONST CHAR *Format;
|
||||
va_dcl
|
||||
#endif
|
||||
{
|
||||
/* Eintrag in Logfile(s) schreiben */
|
||||
|
||||
@ -158,7 +166,11 @@ Log( INT Level, CONST CHAR *Format, ... )
|
||||
#endif
|
||||
|
||||
/* String mit variablen Argumenten zusammenbauen ... */
|
||||
#ifdef PROTOTYPES
|
||||
va_start( ap, Format );
|
||||
#else
|
||||
va_start( ap );
|
||||
#endif
|
||||
vsnprintf( msg, MAX_LOG_MSG_LEN, Format, ap );
|
||||
va_end( ap );
|
||||
|
||||
@ -206,8 +218,16 @@ Log_Exit_Resolver( VOID )
|
||||
} /* Log_Exit_Resolver */
|
||||
|
||||
|
||||
#ifdef PROTOTYPES
|
||||
GLOBAL VOID
|
||||
Log_Resolver( CONST INT Level, CONST CHAR *Format, ... )
|
||||
#else
|
||||
GLOBAL VOID
|
||||
Log_Resolver( Level, Format, va_alist )
|
||||
CONST INT Level;
|
||||
CONST CHAR *Format;
|
||||
va_dcl
|
||||
#endif
|
||||
{
|
||||
/* Eintrag des Resolver in Logfile(s) schreiben */
|
||||
|
||||
@ -227,7 +247,11 @@ Log_Resolver( CONST INT Level, CONST CHAR *Format, ... )
|
||||
#endif
|
||||
|
||||
/* String mit variablen Argumenten zusammenbauen ... */
|
||||
#ifdef PROTOTYPES
|
||||
va_start( ap, Format );
|
||||
#else
|
||||
va_start( ap );
|
||||
#endif
|
||||
vsnprintf( msg, MAX_LOG_MSG_LEN, Format, ap );
|
||||
va_end( ap );
|
||||
|
||||
|
@ -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: messages.h,v 1.39 2002/05/27 12:35:19 alex Exp $
|
||||
* $Id: messages.h,v 1.40 2002/05/30 16:52:21 alex Exp $
|
||||
*
|
||||
* irc.h: IRC-Befehle (Header)
|
||||
*/
|
||||
@ -23,13 +23,13 @@
|
||||
#define RPL_WELCOME_MSG "001 %s :Welcome to the Internet Relay Network %s"
|
||||
|
||||
#define RPL_YOURHOST "002"
|
||||
#define RPL_YOURHOST_MSG "002 %s :Your host is %s, running ngircd "VERSION"-"TARGET_CPU"/"TARGET_VENDOR"/"TARGET_OS
|
||||
#define RPL_YOURHOST_MSG "002 %s :Your host is %s, running ngircd %s-%s/%s/%s"
|
||||
|
||||
#define RPL_CREATED "003"
|
||||
#define RPL_CREATED_MSG "003 %s :This server was started %s"
|
||||
|
||||
#define RPL_MYINFO "004"
|
||||
#define RPL_MYINFO_MSG "004 %s :%s ngircd-"VERSION" "USERMODES" "CHANMODES
|
||||
#define RPL_MYINFO_MSG "004 %s :%s ngircd-%s %s %s"
|
||||
|
||||
#define RPL_UMODEIS "211"
|
||||
#define RPL_UMODEIS_MSG "211 %s +%s"
|
||||
@ -111,7 +111,7 @@
|
||||
#define RPL_TOPIC_MSG "332 %s %s :%s"
|
||||
|
||||
#define RPL_VERSION "351"
|
||||
#define RPL_VERSION_MSG "351 %s "PACKAGE"-"VERSION".%s %s :%s"
|
||||
#define RPL_VERSION_MSG "351 %s %s-%s.%s %s :%s"
|
||||
|
||||
#define RPL_WHOREPLY "352"
|
||||
#define RPL_WHOREPLY_MSG "352 %s %s %s %s %s %s %s :%d %s"
|
||||
|
@ -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: ngircd.c,v 1.46 2002/05/27 13:00:50 alex Exp $
|
||||
* $Id: ngircd.c,v 1.47 2002/05/30 16:52:21 alex Exp $
|
||||
*
|
||||
* ngircd.c: Hier beginnt alles ;-)
|
||||
*/
|
||||
@ -340,7 +340,15 @@ NGIRCd_VersionAddition( VOID )
|
||||
#endif
|
||||
|
||||
if( txt[0] ) strcat( txt, "-" );
|
||||
#ifdef PROTOTYPES
|
||||
strcat( txt, TARGET_CPU"/"TARGET_VENDOR"/"TARGET_OS );
|
||||
#else
|
||||
strcat( txt, TARGET_CPU );
|
||||
strcat( txt, "/" );
|
||||
strcat( txt, TARGET_VENDOR );
|
||||
strcat( txt, "/" );
|
||||
strcat( txt, TARGET_OS );
|
||||
#endif
|
||||
|
||||
return txt;
|
||||
} /* NGIRCd_VersionAddition */
|
||||
|
@ -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: resolve.c,v 1.1 2002/05/27 11:23:27 alex Exp $
|
||||
* $Id: resolve.c,v 1.2 2002/05/30 16:52:21 alex Exp $
|
||||
*
|
||||
* resolve.c: asyncroner Resolver
|
||||
*/
|
||||
@ -40,7 +40,7 @@ LOCAL VOID Do_ResolveAddr PARAMS(( struct sockaddr_in *Addr, INT w_fd ));
|
||||
LOCAL VOID Do_ResolveName PARAMS(( CHAR *Host, INT w_fd ));
|
||||
|
||||
#ifdef h_errno
|
||||
LOCAL CHAR *Resolve_Error PARAMS(( INT H_Error ));
|
||||
LOCAL CHAR *Get_Error PARAMS(( INT H_Error ));
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -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: portabtest.c,v 1.4 2002/05/27 13:01:40 alex Exp $
|
||||
* $Id: portabtest.c,v 1.5 2002/05/30 16:52:20 alex Exp $
|
||||
*
|
||||
* portabtest.c: Testprogramm fuer portab.h
|
||||
*/
|
||||
@ -39,7 +39,7 @@ main( VOID )
|
||||
}
|
||||
else puts( "ok." );
|
||||
|
||||
puts( "- system type: "TARGET_CPU"/"TARGET_VENDOR"/"TARGET_OS );
|
||||
printf( "- system type: %s/%s/%s\n", TARGET_CPU, TARGET_VENDOR, TARGET_OS );
|
||||
|
||||
return ret;
|
||||
} /* main */
|
||||
|
Loading…
Reference in New Issue
Block a user