commit - 6cb785e0a7b0d577f1355d20a76289f55eb36592
commit + 08cf560734765afe70140753db1e881be647e540
blob - 41fedfae2ebe8563dede4d071219eef0972ed2b0
blob + 15d83c0a56ac09bf7edbb9313ec0111d341b8e17
--- src/ngircd/client.c
+++ src/ngircd/client.c
* Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
* der an comBase beteiligten Autoren finden Sie in der Datei AUTHORS.
*
- * $Id: client.c,v 1.6 2001/12/26 03:19:16 alex Exp $
+ * $Id: client.c,v 1.7 2001/12/26 14:45:37 alex Exp $
*
* client.c: Management aller Clients
*
* Server gewesen, so existiert eine entsprechende CONNECTION-Struktur.
*
* $Log: client.c,v $
+ * Revision 1.7 2001/12/26 14:45:37 alex
+ * - "Code Cleanups".
+ *
* Revision 1.6 2001/12/26 03:19:16 alex
* - neue Funktion Client_Name().
*
*
* Revision 1.1 2001/12/14 08:13:43 alex
* - neues Modul begonnen :-)
- *
*/
#include <unistd.h>
#include <string.h>
+#include <exp.h>
+#include "client.h"
+
+#include <imp.h>
#include "channel.h"
#include "conn.h"
+#include "irc.h"
#include "log.h"
+#include "messages.h"
#include <exp.h>
-#include "client.h"
+GLOBAL CLIENT *My_Clients;
+
+
LOCAL CLIENT *New_Client_Struct( VOID );
} /* Client Exit */
-GLOBAL CLIENT *Client_New_Local( CONN_ID Idx, CHAR *Hostname )
+GLOBAL CLIENT *Client_NewLocal( CONN_ID Idx, CHAR *Hostname )
{
/* Neuen lokalen Client erzeugen. */
My_Clients = client;
return client;
-} /* Client_New_Local */
+} /* Client_NewLocal */
GLOBAL VOID Client_Destroy( CLIENT *Client )
} /* Client_Name */
+GLOBAL BOOLEAN Client_CheckNick( CLIENT *Client, CHAR *Nick )
+{
+ /* Nick ueberpruefen */
+
+ CLIENT *c;
+
+ assert( Client != NULL );
+ assert( Nick != NULL );
+
+ /* Nick zu lang? */
+ if( strlen( Nick ) > CLIENT_NICK_LEN ) return IRC_WriteStrClient( Client, This_Server, ERR_ERRONEUSNICKNAME_MSG, Client_Name( Client ), Nick );
+
+ /* Nick bereits vergeben? */
+ c = My_Clients;
+ while( c )
+ {
+ if( strcasecmp( c->nick, Nick ) == 0 )
+ {
+ /* den Nick gibt es bereits */
+ IRC_WriteStrClient( Client, This_Server, ERR_NICKNAMEINUSE_MSG, Client_Name( Client ), Nick );
+ return FALSE;
+ }
+ c = c->next;
+ }
+
+ return TRUE;
+} /* Client_CheckNick */
+
+
LOCAL CLIENT *New_Client_Struct( VOID )
{
/* Neue CLIENT-Struktur pre-initialisieren */
blob - 06257398e9be15cfa48ad1267553845ba516279f
blob + 2680f15f495fc5fdf0ceb957afabb99047d7c647
--- src/ngircd/client.h
+++ src/ngircd/client.h
* Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
* der an comBase beteiligten Autoren finden Sie in der Datei AUTHORS.
*
- * $Id: client.h,v 1.4 2001/12/26 03:19:16 alex Exp $
+ * $Id: client.h,v 1.5 2001/12/26 14:45:37 alex Exp $
*
* client.h: Konfiguration des ngircd (Header)
*
* $Log: client.h,v $
+ * Revision 1.5 2001/12/26 14:45:37 alex
+ * - "Code Cleanups".
+ *
* Revision 1.4 2001/12/26 03:19:16 alex
* - neue Funktion Client_Name().
*
} CLIENT_TYPE;
-/* Das Verfahren, mit dem neue Client-Verbindungen beim Server registriert
- * werden, ist in RFC 2812, Abschnitt 3.1 ff. definiert. */
-
-
typedef struct _CLIENT
{
POINTER *next; /* Zeiger auf naechste Client-Struktur */
GLOBAL CLIENT *This_Server;
-GLOBAL CLIENT *My_Clients;
GLOBAL VOID Client_Init( VOID );
GLOBAL VOID Client_Exit( VOID );
-GLOBAL CLIENT *Client_New_Local( CONN_ID Idx, CHAR *Hostname );
+GLOBAL CLIENT *Client_NewLocal( CONN_ID Idx, CHAR *Hostname );
GLOBAL VOID Client_Destroy( CLIENT *Client );
GLOBAL CLIENT *Client_GetFromConn( CONN_ID Idx );
GLOBAL CHAR *Client_Name( CLIENT *Client );
+GLOBAL BOOLEAN Client_CheckNick( CLIENT *Client, CHAR *Nick );
#endif
blob - fd49efdd88fd104a25532656fba75ba6b592d3e4
blob + f7b22a5b9adc1504098a1db318f58d3d3c783487
--- src/ngircd/conf.c
+++ src/ngircd/conf.c
* Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
* der an comBase beteiligten Autoren finden Sie in der Datei AUTHORS.
*
- * $Id: conf.c,v 1.2 2001/12/26 03:19:57 alex Exp $
+ * $Id: conf.c,v 1.3 2001/12/26 14:45:37 alex Exp $
*
* conf.h: Konfiguration des ngircd
*
* $Log: conf.c,v $
+ * Revision 1.3 2001/12/26 14:45:37 alex
+ * - "Code Cleanups".
+ *
* Revision 1.2 2001/12/26 03:19:57 alex
* - erste Konfigurations-Variablen definiert: PING/PONG-Timeout.
*
* Revision 1.1 2001/12/12 17:18:20 alex
* - Modul fuer Server-Konfiguration begonnen.
- *
*/
GLOBAL VOID Conf_Init( VOID )
{
- Conf_PING_Timeout = 120;
- Conf_PONG_Timeout = 10;
+ Conf_PingTimeout = 120;
+ Conf_PongTimeout = 10;
} /* Config_Init */
blob - 053d2a9ab9248c26b05e2ba80cb5428100b358a8
blob + 5d360ab3c8dd1f0a00a05ae9b5ed18e38ee791d4
--- src/ngircd/conf.h
+++ src/ngircd/conf.h
* Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
* der an comBase beteiligten Autoren finden Sie in der Datei AUTHORS.
*
- * $Id: conf.h,v 1.2 2001/12/26 03:19:57 alex Exp $
+ * $Id: conf.h,v 1.3 2001/12/26 14:45:37 alex Exp $
*
* conf.h: Konfiguration des ngircd (Header)
*
* $Log: conf.h,v $
+ * Revision 1.3 2001/12/26 14:45:37 alex
+ * - "Code Cleanups".
+ *
* Revision 1.2 2001/12/26 03:19:57 alex
* - erste Konfigurations-Variablen definiert: PING/PONG-Timeout.
*
* Revision 1.1 2001/12/12 17:18:20 alex
* - Modul fuer Server-Konfiguration begonnen.
- *
*/
#define __conf_h__
-GLOBAL INT Conf_PING_Timeout;
-GLOBAL INT Conf_PONG_Timeout;
+GLOBAL INT Conf_PingTimeout;
+GLOBAL INT Conf_PongTimeout;
GLOBAL VOID Conf_Init( VOID );
blob - 70b4cf7df4c2b3fe8e27f49f1659e48d37b6b0fd
blob + e05305e4d7ed34ca1111a21b79810c80dddce5c3
--- src/ngircd/conn.c
+++ src/ngircd/conn.c
* Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
* der an comBase beteiligten Autoren finden Sie in der Datei AUTHORS.
*
- * $Id: conn.c,v 1.13 2001/12/26 03:36:57 alex Exp $
+ * $Id: conn.c,v 1.14 2001/12/26 14:45:37 alex Exp $
*
* connect.h: Verwaltung aller Netz-Verbindungen ("connections")
*
* $Log: conn.c,v $
+ * Revision 1.14 2001/12/26 14:45:37 alex
+ * - "Code Cleanups".
+ *
* Revision 1.13 2001/12/26 03:36:57 alex
* - Verbindungen mit Lesefehlern werden nun korrekt terminiert.
*
} /* Conn_Exit */
-GLOBAL BOOLEAN Conn_New_Listener( CONST INT Port )
+GLOBAL BOOLEAN Conn_NewListener( CONST INT Port )
{
/* Neuen Listen-Socket erzeugen: der Server wartet dann
* auf dem angegebenen Port auf Verbindungen. */
Log( LOG_INFO, "Now listening on port %d, socket %d.", Port, sock );
return TRUE;
-} /* Conn_New_Listener */
+} /* Conn_NewListener */
GLOBAL VOID Conn_Handler( INT Timeout )
}
/* Client-Struktur initialisieren */
- if( ! Client_New_Local( idx, inet_ntoa( new_addr.sin_addr )))
+ if( ! Client_NewLocal( idx, inet_ntoa( new_addr.sin_addr )))
{
Log( LOG_ALERT, "Can't accept connection: can't create client structure!" );
close( new_sock );
if( My_Connections[i].lastping > My_Connections[i].lastdata )
{
/* es wurde bereits ein PING gesendet */
- if( My_Connections[i].lastping < time( NULL ) - Conf_PONG_Timeout )
+ if( My_Connections[i].lastping < time( NULL ) - Conf_PongTimeout )
{
/* Timeout */
Log( LOG_NOTICE, "Connection %d: Ping timeout." );
Conn_Close( i, "Ping timeout" );
}
}
- else if( My_Connections[i].lastdata < time( NULL ) - Conf_PING_Timeout )
+ else if( My_Connections[i].lastdata < time( NULL ) - Conf_PingTimeout )
{
/* es muss ein PING gesendet werden */
Log( LOG_DEBUG, "Connection %d: sending PING ...", i );
blob - 02b744ef5f0fad386ac462144b03e58cf2409b94
blob + 3db6f6cc6179108a7b9347c67d56f6c2675802f3
--- src/ngircd/conn.h
+++ src/ngircd/conn.h
* Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
* der an comBase beteiligten Autoren finden Sie in der Datei AUTHORS.
*
- * $Id: conn.h,v 1.6 2001/12/25 22:03:47 alex Exp $
+ * $Id: conn.h,v 1.7 2001/12/26 14:45:37 alex Exp $
*
* conn.h: Verwaltung aller Netz-Verbindungen ("connections") (Header)
*
* $Log: conn.h,v $
+ * Revision 1.7 2001/12/26 14:45:37 alex
+ * - "Code Cleanups".
+ *
* Revision 1.6 2001/12/25 22:03:47 alex
* - Conn_Close() eingefuehrt: war die lokale Funktion Close_Connection().
*
GLOBAL VOID Conn_Init( VOID );
GLOBAL VOID Conn_Exit( VOID );
-GLOBAL BOOLEAN Conn_New_Listener( CONST INT Port );
+GLOBAL BOOLEAN Conn_NewListener( CONST INT Port );
GLOBAL VOID Conn_Handler( INT Timeout );
blob - 82abcbaf99810c6089f020e1318d2d9ff931ce80
blob + fb3ed53a35e1fa38312209ea1a7cf3487190914f
--- src/ngircd/irc.c
+++ src/ngircd/irc.c
* Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
* der an comBase beteiligten Autoren finden Sie in der Datei AUTHORS.
*
- * $Id: irc.c,v 1.8 2001/12/26 03:21:46 alex Exp $
+ * $Id: irc.c,v 1.9 2001/12/26 14:45:37 alex Exp $
*
* irc.c: IRC-Befehle
*
* $Log: irc.c,v $
+ * Revision 1.9 2001/12/26 14:45:37 alex
+ * - "Code Cleanups".
+ *
* Revision 1.8 2001/12/26 03:21:46 alex
* - PING/PONG-Befehle implementiert,
* - Meldungen ueberarbeitet: enthalten nun (fast) immer den Nick.
} /* IRC_Exit */
-GLOBAL BOOLEAN IRC_WriteStr_Client( CLIENT *Client, CLIENT *Prefix, CHAR *Format, ... )
+GLOBAL BOOLEAN IRC_WriteStrClient( CLIENT *Client, CLIENT *Prefix, CHAR *Format, ... )
{
/* Text an Clients, lokal bzw. remote, senden. */
else
{
/* Remote-Client */
- Log( LOG_EMERG, "not implemented: IRC_WriteStr_Client()" );
+ Log( LOG_EMERG, "not implemented: IRC_WriteStrClient()" );
}
va_end( ap );
return ok;
-} /* IRC_WriteStr_Client */
+} /* IRC_WriteStrClient */
GLOBAL BOOLEAN IRC_PASS( CLIENT *Client, REQUEST *Req )
if( Client->type == CLIENT_UNKNOWN )
{
Log( LOG_DEBUG, "Connection %d: got PASS command ...", Client->conn_id );
- return IRC_WriteStr_Client( Client, This_Server, ERR_UNKNOWNCOMMAND_MSG, Client_Name( Client ), Req->command );
+ return IRC_WriteStrClient( Client, This_Server, ERR_UNKNOWNCOMMAND_MSG, Client_Name( Client ), Req->command );
}
- else return IRC_WriteStr_Client( Client, This_Server, ERR_ALREADYREGISTRED_MSG, Client_Name( Client ));
+ else return IRC_WriteStrClient( Client, This_Server, ERR_ALREADYREGISTRED_MSG, Client_Name( Client ));
} /* IRC_PASS */
GLOBAL BOOLEAN IRC_NICK( CLIENT *Client, REQUEST *Req )
{
- CLIENT *c;
-
assert( Client != NULL );
assert( Req != NULL );
if( Client->type != CLIENT_SERVER && Client->type != CLIENT_SERVICE )
{
/* Falsche Anzahl Parameter? */
- if( Req->argc != 1 ) return IRC_WriteStr_Client( Client, This_Server, ERR_NEEDMOREPARAMS_MSG, Client_Name( Client ), Req->command );
+ if( Req->argc != 1 ) return IRC_WriteStrClient( Client, This_Server, ERR_NEEDMOREPARAMS_MSG, Client_Name( Client ), Req->command );
- /* Nick zu lang? */
- if( strlen( Req->argv[0] ) > CLIENT_NICK_LEN ) return IRC_WriteStr_Client( Client, This_Server, ERR_ERRONEUSNICKNAME_MSG, Client_Name( Client ), Req->argv[0] );
-
/* pruefen, ob Nick bereits vergeben */
- c = My_Clients;
- while( c )
- {
- if( strcasecmp( c->nick, Req->argv[0] ) == 0 )
- {
- /* den Nick gibt es bereits */
- return IRC_WriteStr_Client( Client, This_Server, ERR_NICKNAMEINUSE_MSG, Client_Name( Client ), Req->argv[0] );
- }
- c = c->next;
- }
+ if( ! Client_CheckNick( Client, Req->argv[0] )) return CONNECTED;
/* Client-Nick registrieren */
strcpy( Client->nick, Req->argv[0] );
}
return CONNECTED;
}
- else return IRC_WriteStr_Client( Client, This_Server, ERR_ALREADYREGISTRED_MSG, Client_Name( Client ));
+ else return IRC_WriteStrClient( Client, This_Server, ERR_ALREADYREGISTRED_MSG, Client_Name( Client ));
} /* IRC_NICK */
if( Client->type == CLIENT_UNKNOWN || Client->type == CLIENT_GOTNICK || Client->type == CLIENT_GOTPASS )
{
/* Falsche Anzahl Parameter? */
- if( Req->argc != 4 ) return IRC_WriteStr_Client( Client, This_Server, ERR_NEEDMOREPARAMS_MSG, Client_Name( Client ), Req->command );
+ if( Req->argc != 4 ) return IRC_WriteStrClient( Client, This_Server, ERR_NEEDMOREPARAMS_MSG, Client_Name( Client ), Req->command );
strncpy( Client->user, Req->argv[0], CLIENT_USER_LEN );
Client->user[CLIENT_USER_LEN] = '\0';
}
else if( Client->type == CLIENT_USER || Client->type == CLIENT_SERVER || Client->type == CLIENT_SERVICE )
{
- return IRC_WriteStr_Client( Client, This_Server, ERR_ALREADYREGISTRED_MSG, Client_Name( Client ));
+ return IRC_WriteStrClient( Client, This_Server, ERR_ALREADYREGISTRED_MSG, Client_Name( Client ));
}
- else return IRC_WriteStr_Client( Client, This_Server, ERR_NOTREGISTERED_MSG, Client_Name( Client ));
+ else return IRC_WriteStrClient( Client, This_Server, ERR_NOTREGISTERED_MSG, Client_Name( Client ));
} /* IRC_USER */
if( Client->type != CLIENT_SERVER && Client->type != CLIENT_SERVICE )
{
/* Falsche Anzahl Parameter? */
- if( Req->argc > 1 ) return IRC_WriteStr_Client( Client, This_Server, ERR_NEEDMOREPARAMS_MSG, Client_Name( Client ), Req->command );
+ if( Req->argc > 1 ) return IRC_WriteStrClient( Client, This_Server, ERR_NEEDMOREPARAMS_MSG, Client_Name( Client ), Req->command );
Conn_Close( Client->conn_id, "Client wants to quit." );
return DISCONNECTED;
}
- else return IRC_WriteStr_Client( Client, This_Server, ERR_NOTREGISTERED_MSG, Client_Name( Client ));
+ else return IRC_WriteStrClient( Client, This_Server, ERR_NOTREGISTERED_MSG, Client_Name( Client ));
} /* IRC_QUIT */
assert( Client != NULL );
assert( Req != NULL );
- return IRC_WriteStr_Client( Client, This_Server, ERR_UNKNOWNCOMMAND_MSG, Client_Name( Client ), Req->command );
+ return IRC_WriteStrClient( Client, This_Server, ERR_UNKNOWNCOMMAND_MSG, Client_Name( Client ), Req->command );
} /* IRC_PING */
if( ! Check_Valid_User( Client )) return CONNECTED;
/* Falsche Anzahl Parameter? */
- if( Req->argc < 1 ) return IRC_WriteStr_Client( Client, This_Server, ERR_NOORIGIN_MSG, Client_Name( Client ));
- if( Req->argc > 1 ) return IRC_WriteStr_Client( Client, This_Server, ERR_NEEDMOREPARAMS_MSG, Client_Name( Client ), Req->command );
+ if( Req->argc < 1 ) return IRC_WriteStrClient( Client, This_Server, ERR_NOORIGIN_MSG, Client_Name( Client ));
+ if( Req->argc > 1 ) return IRC_WriteStrClient( Client, This_Server, ERR_NEEDMOREPARAMS_MSG, Client_Name( Client ), Req->command );
/* Der Connection-Timestamp wurde schon beim Lesen aus dem Socket
* aktualisiert, daher muss das hier nicht mehr gemacht werden. */
if( ! Check_Valid_User( Client )) return CONNECTED;
/* Falsche Anzahl Parameter? */
- if( Req->argc != 0 ) return IRC_WriteStr_Client( Client, This_Server, ERR_NEEDMOREPARAMS_MSG, Client_Name( Client ), Req->command );
+ if( Req->argc != 0 ) return IRC_WriteStrClient( Client, This_Server, ERR_NEEDMOREPARAMS_MSG, Client_Name( Client ), Req->command );
return Show_MOTD( Client );
} /* IRC_MOTD */
if( Client->type != CLIENT_USER )
{
- IRC_WriteStr_Client( Client, This_Server, ERR_NOTREGISTERED_MSG, Client_Name( Client ));
+ IRC_WriteStrClient( Client, This_Server, ERR_NOTREGISTERED_MSG, Client_Name( Client ));
return FALSE;
}
else return TRUE;
Log( LOG_NOTICE, "User \"%s!%s@%s\" (%s) registered.", Client->nick, Client->user, Client->host, Client->name );
- IRC_WriteStr_Client( Client, This_Server, RPL_WELCOME_MSG, Client->nick, Client->nick, Client->user, Client->host );
- IRC_WriteStr_Client( Client, This_Server, RPL_YOURHOST_MSG, Client->nick, This_Server->host );
- IRC_WriteStr_Client( Client, This_Server, RPL_CREATED_MSG, Client->nick );
- IRC_WriteStr_Client( Client, This_Server, RPL_MYINFO_MSG, Client->nick, This_Server->host );
+ IRC_WriteStrClient( Client, This_Server, RPL_WELCOME_MSG, Client->nick, Client->nick, Client->user, Client->host );
+ IRC_WriteStrClient( Client, This_Server, RPL_YOURHOST_MSG, Client->nick, This_Server->host );
+ IRC_WriteStrClient( Client, This_Server, RPL_CREATED_MSG, Client->nick );
+ IRC_WriteStrClient( Client, This_Server, RPL_MYINFO_MSG, Client->nick, This_Server->host );
Client->type = CLIENT_USER;
assert( Client != NULL );
assert( Client->nick[0] );
- IRC_WriteStr_Client( Client, This_Server, RPL_MOTDSTART_MSG, Client->nick, This_Server->host );
- IRC_WriteStr_Client( Client, This_Server, RPL_MOTD_MSG, Client->nick, "Some cool IRC server welcome message ;-)" );
- return IRC_WriteStr_Client( Client, This_Server, RPL_ENDOFMOTD_MSG, Client->nick );
+ IRC_WriteStrClient( Client, This_Server, RPL_MOTDSTART_MSG, Client->nick, This_Server->host );
+ IRC_WriteStrClient( Client, This_Server, RPL_MOTD_MSG, Client->nick, "Some cool IRC server welcome message ;-)" );
+ return IRC_WriteStrClient( Client, This_Server, RPL_ENDOFMOTD_MSG, Client->nick );
} /* Show_MOTD */
blob - cfb46441dc10ac85ea6472baeaf845d672b68960
blob + 858ce42c3229a3057d96ce19d4d358cd216499ae
--- src/ngircd/irc.h
+++ src/ngircd/irc.h
* Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
* der an comBase beteiligten Autoren finden Sie in der Datei AUTHORS.
*
- * $Id: irc.h,v 1.5 2001/12/26 03:21:46 alex Exp $
+ * $Id: irc.h,v 1.6 2001/12/26 14:45:37 alex Exp $
*
* irc.h: IRC-Befehle (Header)
*
* $Log: irc.h,v $
+ * Revision 1.6 2001/12/26 14:45:37 alex
+ * - "Code Cleanups".
+ *
* Revision 1.5 2001/12/26 03:21:46 alex
* - PING/PONG-Befehle implementiert,
* - Meldungen ueberarbeitet: enthalten nun (fast) immer den Nick.
GLOBAL VOID IRC_Init( VOID );
GLOBAL VOID IRC_Exit( VOID );
-GLOBAL BOOLEAN IRC_WriteStr_Client( CLIENT *Client, CLIENT *Prefix, CHAR *Format, ... );
+GLOBAL BOOLEAN IRC_WriteStrClient( CLIENT *Client, CLIENT *Prefix, CHAR *Format, ... );
GLOBAL BOOLEAN IRC_PASS( CLIENT *Client, REQUEST *Req );
GLOBAL BOOLEAN IRC_NICK( CLIENT *Client, REQUEST *Req );
blob - 73d4ca990acc408ca3c1c287f8f3a2c2c35d8462
blob + 6039c82aa4ae5c2dda551dce53e3a9f4dc4ebaa7
--- src/ngircd/ngircd.c
+++ src/ngircd/ngircd.c
* Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
* der an comBase beteiligten Autoren finden Sie in der Datei AUTHORS.
*
- * $Id: ngircd.c,v 1.10 2001/12/24 01:34:38 alex Exp $
+ * $Id: ngircd.c,v 1.11 2001/12/26 14:45:37 alex Exp $
*
* ngircd.c: Hier beginnt alles ;-)
*
* $Log: ngircd.c,v $
+ * Revision 1.11 2001/12/26 14:45:37 alex
+ * - "Code Cleanups".
+ *
* Revision 1.10 2001/12/24 01:34:38 alex
* - Signal-Handler aufgeraeumt; u.a. SIGPIPE wird nun korrekt ignoriert.
*
Client_Init( );
Conn_Init( );
+ /* Signal-Handler initialisieren */
Initialize_Signal_Handler( );
- if( ! Conn_New_Listener( 6668 )) exit( 1 );
- if( ! Conn_New_Listener( 6669 )) Log( LOG_WARNING, "Can't create second listening socket!" );
+ if( ! Conn_NewListener( 6668 )) exit( 1 );
+ if( ! Conn_NewListener( 6669 )) Log( LOG_WARNING, "Can't create second listening socket!" );
/* Hauptschleife */
while( ! NGIRCd_Quit )
LOCAL VOID Initialize_Signal_Handler( VOID )
{
- /* Signal-Handler initialisieren: Strukturen anlegen und einhaengen :-) */
+ /* Signal-Handler initialisieren: einige Signale
+ * werden ignoriert, andere speziell behandelt. */
struct sigaction saction;
blob - aa78357214b34f2d0613f653375d30cca29c79e0
blob + 98d5094e76e2b43e0e7591258213d230f3aecb9f
--- src/ngircd/parse.c
+++ src/ngircd/parse.c
* Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
* der an comBase beteiligten Autoren finden Sie in der Datei AUTHORS.
*
- * $Id: parse.c,v 1.5 2001/12/26 03:23:03 alex Exp $
+ * $Id: parse.c,v 1.6 2001/12/26 14:45:37 alex Exp $
*
* parse.c: Parsen der Client-Anfragen
*
* $Log: parse.c,v $
+ * Revision 1.6 2001/12/26 14:45:37 alex
+ * - "Code Cleanups".
+ *
* Revision 1.5 2001/12/26 03:23:03 alex
* - PING/PONG-Befehle implementiert.
*
else if( strcasecmp( Req->command, "MOTD" ) == 0 ) return IRC_MOTD( client, Req );
/* Unbekannter Befehl */
- IRC_WriteStr_Client( client, This_Server, ERR_UNKNOWNCOMMAND_MSG, Client_Name( client ), Req->command );
+ IRC_WriteStrClient( client, This_Server, ERR_UNKNOWNCOMMAND_MSG, Client_Name( client ), Req->command );
Log( LOG_DEBUG, "Connection %d: Unknown command '%s', %d %s,%s prefix.", Idx, Req->command, Req->argc, Req->argc == 1 ? "parameter" : "parameters", Req->prefix ? "" : " no" );
blob - 72f0f4ae729884f28271e4c65f9b8d0a7587a2eb
blob + 919eb65e236030678afed582c63a2229f4542906
--- src/ngircd/parse.h
+++ src/ngircd/parse.h
* Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
* der an comBase beteiligten Autoren finden Sie in der Datei AUTHORS.
*
- * $Id: parse.h,v 1.1 2001/12/21 23:53:16 alex Exp $
+ * $Id: parse.h,v 1.2 2001/12/26 14:45:37 alex Exp $
*
* parse.h: Parsen der Client-Anfragen (Header)
*
* $Log: parse.h,v $
+ * Revision 1.2 2001/12/26 14:45:37 alex
+ * - "Code Cleanups".
+ *
* Revision 1.1 2001/12/21 23:53:16 alex
* - Modul zum Parsen von Client-Requests begonnen.
- *
*/
blob - 70c09588536f72530e86ca753912d59fcfff7d4b
blob + 63069fe3af8fe1437a8cc30689e3477083d922c0
--- src/ngircd/tool.h
+++ src/ngircd/tool.h
* Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
* der an comBase beteiligten Autoren finden Sie in der Datei AUTHORS.
*
- * $Id: tool.h,v 1.2 2001/12/12 17:20:33 alex Exp $
+ * $Id: tool.h,v 1.3 2001/12/26 14:45:37 alex Exp $
*
* log.h: Hilfsfunktionen (Header)
*
* $Log: tool.h,v $
+ * Revision 1.3 2001/12/26 14:45:37 alex
+ * - "Code Cleanups".
+ *
* Revision 1.2 2001/12/12 17:20:33 alex
* - Tool-Funktionen haben nun das Praefix "ngt_".
*
#define __tool_h__
-GLOBAL VOID ngt_Trim_Str( CHAR *String );
+GLOBAL VOID ngt_TrimStr( CHAR *String );
#endif