commit - 68835a1d1acb36a5e38870a83a261a969b1878e4
commit + ea041b8838714707dca4500f63e2b40344b506c2
blob - 0a1ba4552b59b1043b988fe9d316f3b184815075
blob + 6f8507244501853c7b72b767864e5b250bd3fcf3
--- src/ngircd/channel.c
+++ src/ngircd/channel.c
* Add_Client().
*/
GLOBAL bool
-Channel_Join( CLIENT *Client, char *Name )
+Channel_Join( CLIENT *Client, const char *Name )
{
CHANNEL *chan;
GLOBAL void
-Channel_Quit( CLIENT *Client, char *Reason )
+Channel_Quit( CLIENT *Client, const char *Reason )
{
CHANNEL *c, *next_c;
GLOBAL void
-Channel_SetModes( CHANNEL *Chan, char *Modes )
+Channel_SetModes( CHANNEL *Chan, const char *Modes )
{
assert( Chan != NULL );
assert( Modes != NULL );
* Log a message to the local &SERVER channel, if it exists.
*/
GLOBAL void
-Channel_LogServer(char *msg)
+Channel_LogServer(const char *msg)
{
CHANNEL *sc;
CLIENT *c;
blob - b41cced2a26355519f0770560143bc99c31788c6
blob + 46e7e13a8df2f233f1f5ab0cb2c2fc93ca99ed42
--- src/ngircd/channel.h
+++ src/ngircd/channel.h
GLOBAL void Channel_InitPredefined PARAMS(( void ));
GLOBAL void Channel_Exit PARAMS(( void ));
-GLOBAL bool Channel_Join PARAMS(( CLIENT *Client, char *Name ));
+GLOBAL bool Channel_Join PARAMS(( CLIENT *Client, const char *Name ));
GLOBAL bool Channel_Part PARAMS(( CLIENT *Client, CLIENT *Origin, const char *Name, const char *Reason ));
-GLOBAL void Channel_Quit PARAMS(( CLIENT *Client, char *Reason ));
+GLOBAL void Channel_Quit PARAMS(( CLIENT *Client, const char *Reason ));
GLOBAL void Channel_Kick PARAMS((CLIENT *Peer, CLIENT *Target, CLIENT *Origin,
const char *Name, const char *Reason));
GLOBAL unsigned long Channel_MaxUsers PARAMS(( CHANNEL *Chan ));
GLOBAL void Channel_SetTopic PARAMS(( CHANNEL *Chan, CLIENT *Client, const char *Topic ));
-GLOBAL void Channel_SetModes PARAMS(( CHANNEL *Chan, char *Modes ));
+GLOBAL void Channel_SetModes PARAMS(( CHANNEL *Chan, const char *Modes ));
GLOBAL void Channel_SetKey PARAMS(( CHANNEL *Chan, const char *Key ));
GLOBAL void Channel_SetMaxUsers PARAMS(( CHANNEL *Chan, unsigned long Count ));
GLOBAL bool Channel_ShowBans PARAMS((CLIENT *client, CHANNEL *c));
GLOBAL bool Channel_ShowInvites PARAMS((CLIENT *client, CHANNEL *c));
-GLOBAL void Channel_LogServer PARAMS((char *msg));
+GLOBAL void Channel_LogServer PARAMS((const char *msg));
GLOBAL bool Channel_CheckKey PARAMS((CHANNEL *Chan, CLIENT *Client,
const char *Key));
blob - fbe130a13a9c0267926e8568263eafabaf592330
blob + 076a0cb425f17c976be9b92e0e38649b9f688ab0
--- src/ngircd/client.c
+++ src/ngircd/client.c
static void Adjust_Counters PARAMS(( CLIENT *Client ));
static CLIENT *Init_New_Client PARAMS((CONN_ID Idx, CLIENT *Introducer,
- CLIENT *TopServer, int Type, char *ID,
- char *User, char *Hostname, char *Info,
- int Hops, int Token, char *Modes,
+ CLIENT *TopServer, int Type, const char *ID,
+ const char *User, const char *Hostname, const char *Info,
+ int Hops, int Token, const char *Modes,
bool Idented));
-static void Destroy_UserOrService PARAMS((CLIENT *Client, char *Txt, char *FwdMsg,
+static void Destroy_UserOrService PARAMS((CLIENT *Client,const char *Txt, const char *FwdMsg,
bool SendQuit));
* @return New CLIENT structure.
*/
GLOBAL CLIENT *
-Client_NewLocal(CONN_ID Idx, char *Hostname, int Type, bool Idented)
+Client_NewLocal(CONN_ID Idx, const char *Hostname, int Type, bool Idented)
{
return Init_New_Client(Idx, This_Server, NULL, Type, NULL, NULL,
Hostname, NULL, 0, 0, NULL, Idented);
* @return New CLIENT structure.
*/
GLOBAL CLIENT *
-Client_NewRemoteServer(CLIENT *Introducer, char *Hostname, CLIENT *TopServer,
- int Hops, int Token, char *Info, bool Idented)
+Client_NewRemoteServer(CLIENT *Introducer, const char *Hostname, CLIENT *TopServer,
+ int Hops, int Token, const char *Info, bool Idented)
{
return Init_New_Client(NONE, Introducer, TopServer, CLIENT_SERVER,
Hostname, NULL, Hostname, Info, Hops, Token, NULL, Idented);
* @return New CLIENT structure.
*/
GLOBAL CLIENT *
-Client_NewRemoteUser(CLIENT *Introducer, char *Nick, int Hops, char *User,
- char *Hostname, int Token, char *Modes, char *Info, bool Idented)
+Client_NewRemoteUser(CLIENT *Introducer, const char *Nick, int Hops, const char *User,
+ const char *Hostname, int Token, const char *Modes, const char *Info, bool Idented)
{
return Init_New_Client(NONE, Introducer, NULL, CLIENT_USER, Nick,
User, Hostname, Info, Hops, Token, Modes, Idented);
*/
static CLIENT *
Init_New_Client(CONN_ID Idx, CLIENT *Introducer, CLIENT *TopServer,
- int Type, char *ID, char *User, char *Hostname, char *Info, int Hops,
- int Token, char *Modes, bool Idented)
+ int Type, const char *ID, const char *User, const char *Hostname, const char *Info, int Hops,
+ int Token, const char *Modes, bool Idented)
{
CLIENT *client;
GLOBAL void
-Client_Destroy( CLIENT *Client, char *LogMsg, char *FwdMsg, bool SendQuit )
+Client_Destroy( CLIENT *Client, const char *LogMsg, const char *FwdMsg, bool SendQuit )
{
/* Client entfernen. */
CLIENT *last, *c;
- char msg[LINE_LEN], *txt;
+ char msg[LINE_LEN];
+ const char *txt;
assert( Client != NULL );
GLOBAL void
-Client_SetHostname( CLIENT *Client, char *Hostname )
+Client_SetHostname( CLIENT *Client, const char *Hostname )
{
/* Hostname eines Clients setzen */
GLOBAL void
-Client_SetID( CLIENT *Client, char *ID )
+Client_SetID( CLIENT *Client, const char *ID )
{
/* Hostname eines Clients setzen, Hash-Wert berechnen */
GLOBAL void
-Client_SetUser( CLIENT *Client, char *User, bool Idented )
+Client_SetUser( CLIENT *Client, const char *User, bool Idented )
{
/* Username eines Clients setzen */
GLOBAL void
-Client_SetInfo( CLIENT *Client, char *Info )
+Client_SetInfo( CLIENT *Client, const char *Info )
{
/* Hostname eines Clients setzen */
GLOBAL void
-Client_SetModes( CLIENT *Client, char *Modes )
+Client_SetModes( CLIENT *Client, const char *Modes )
{
/* Modes eines Clients setzen */
GLOBAL void
-Client_SetFlags( CLIENT *Client, char *Flags )
+Client_SetFlags( CLIENT *Client, const char *Flags )
{
/* Flags eines Clients setzen */
GLOBAL void
-Client_SetPassword( CLIENT *Client, char *Pwd )
+Client_SetPassword( CLIENT *Client, const char *Pwd )
{
/* Von einem Client geliefertes Passwort */
GLOBAL void
-Client_SetAway( CLIENT *Client, char *Txt )
+Client_SetAway( CLIENT *Client, const char *Txt )
{
/* Set AWAY reason of client */
* Destroy user or service client.
*/
static void
-Destroy_UserOrService(CLIENT *Client, char *Txt, char *FwdMsg, bool SendQuit)
+Destroy_UserOrService(CLIENT *Client, const char *Txt, const char *FwdMsg, bool SendQuit)
{
if(Client->conn_id != NONE) {
/* Local (directly connected) client */
blob - 6fcf7b64e22fe35f65c5fe64d2ff135813dee84b
blob + 106491741de783dcd9cf89b0b4308d71b3924a64
--- src/ngircd/client.h
+++ src/ngircd/client.h
GLOBAL void Client_Init PARAMS(( void ));
GLOBAL void Client_Exit PARAMS(( void ));
-GLOBAL CLIENT *Client_NewLocal PARAMS(( CONN_ID Idx, char *Hostname, int Type, bool Idented ));
-GLOBAL CLIENT *Client_NewRemoteServer PARAMS(( CLIENT *Introducer, char *Hostname, CLIENT *TopServer, int Hops, int Token, char *Info, bool Idented ));
-GLOBAL CLIENT *Client_NewRemoteUser PARAMS(( CLIENT *Introducer, char *Nick, int Hops, char *User, char *Hostname, int Token, char *Modes, char *Info, bool Idented ));
+GLOBAL CLIENT *Client_NewLocal PARAMS(( CONN_ID Idx, const char *Hostname, int Type, bool Idented ));
+GLOBAL CLIENT *Client_NewRemoteServer PARAMS(( CLIENT *Introducer, const char *Hostname, CLIENT *TopServer, int Hops, int Token, const char *Info, bool Idented ));
+GLOBAL CLIENT *Client_NewRemoteUser PARAMS(( CLIENT *Introducer, const char *Nick, int Hops, const char *User, const char *Hostname, int Token, const char *Modes, const char *Info, bool Idented ));
-GLOBAL void Client_Destroy PARAMS(( CLIENT *Client, char *LogMsg, char *FwdMsg, bool SendQuit ));
+GLOBAL void Client_Destroy PARAMS(( CLIENT *Client, const char *LogMsg, const char *FwdMsg, bool SendQuit ));
GLOBAL CLIENT *Client_ThisServer PARAMS(( void ));
GLOBAL bool Client_HasMode PARAMS(( CLIENT *Client, char Mode ));
-GLOBAL void Client_SetHostname PARAMS(( CLIENT *Client, char *Hostname ));
-GLOBAL void Client_SetID PARAMS(( CLIENT *Client, char *Nick ));
-GLOBAL void Client_SetUser PARAMS(( CLIENT *Client, char *User, bool Idented ));
-GLOBAL void Client_SetInfo PARAMS(( CLIENT *Client, char *Info ));
-GLOBAL void Client_SetPassword PARAMS(( CLIENT *Client, char *Pwd ));
+GLOBAL void Client_SetHostname PARAMS(( CLIENT *Client, const char *Hostname ));
+GLOBAL void Client_SetID PARAMS(( CLIENT *Client, const char *Nick ));
+GLOBAL void Client_SetUser PARAMS(( CLIENT *Client, const char *User, bool Idented ));
+GLOBAL void Client_SetInfo PARAMS(( CLIENT *Client, const char *Info ));
+GLOBAL void Client_SetPassword PARAMS(( CLIENT *Client, const char *Pwd ));
GLOBAL void Client_SetType PARAMS(( CLIENT *Client, int Type ));
GLOBAL void Client_SetHops PARAMS(( CLIENT *Client, int Hops ));
GLOBAL void Client_SetToken PARAMS(( CLIENT *Client, int Token ));
GLOBAL void Client_SetOperByMe PARAMS(( CLIENT *Client, bool OperByMe ));
-GLOBAL void Client_SetModes PARAMS(( CLIENT *Client, char *Modes ));
-GLOBAL void Client_SetFlags PARAMS(( CLIENT *Client, char *Flags ));
+GLOBAL void Client_SetModes PARAMS(( CLIENT *Client, const char *Modes ));
+GLOBAL void Client_SetFlags PARAMS(( CLIENT *Client, const char *Flags ));
GLOBAL void Client_SetIntroducer PARAMS(( CLIENT *Client, CLIENT *Introducer ));
-GLOBAL void Client_SetAway PARAMS(( CLIENT *Client, char *Txt ));
+GLOBAL void Client_SetAway PARAMS(( CLIENT *Client, const char *Txt ));
GLOBAL bool Client_ModeAdd PARAMS(( CLIENT *Client, char Mode ));
GLOBAL bool Client_ModeDel PARAMS(( CLIENT *Client, char Mode ));
blob - 71f5760bd59dede7c58903f6bd98a41c8a262c06
blob + a3c9afecf097c88de0fc55e9b1ac44aebb9c25b0
--- src/ngircd/conf.c
+++ src/ngircd/conf.c
GLOBAL bool
-Conf_EnableServer( char *Name, UINT16 Port )
+Conf_EnableServer( const char *Name, UINT16 Port )
{
/* Enable specified server and adjust port */
GLOBAL bool
-Conf_DisableServer( char *Name )
+Conf_DisableServer( const char *Name )
{
/* Enable specified server and adjust port */
GLOBAL bool
-Conf_AddServer( char *Name, UINT16 Port, char *Host, char *MyPwd, char *PeerPwd )
+Conf_AddServer( const char *Name, UINT16 Port, const char *Host, const char *MyPwd, const char *PeerPwd )
{
/* Add new server to configuration */
* Check if the given nick name is an service
*/
GLOBAL bool
-Conf_IsService(int ConfServer, char *Nick)
+Conf_IsService(int ConfServer, const char *Nick)
{
return MatchCaseInsensitive(Conf_Server[ConfServer].svs_mask, Nick);
} /* Conf_IsService */
blob - 4695b25ab8d2486305209f204adb20c87de92bfe
blob + 9bdecdeee69fb44dcefbf888863a239733d84bd7
--- src/ngircd/conf.h
+++ src/ngircd/conf.h
GLOBAL void Conf_SetServer PARAMS(( int ConfServer, CONN_ID Idx ));
GLOBAL int Conf_GetServer PARAMS(( CONN_ID Idx ));
-GLOBAL bool Conf_EnableServer PARAMS(( char *Name, UINT16 Port ));
+GLOBAL bool Conf_EnableServer PARAMS(( const char *Name, UINT16 Port ));
GLOBAL bool Conf_EnablePassiveServer PARAMS((const char *Name));
-GLOBAL bool Conf_DisableServer PARAMS(( char *Name ));
-GLOBAL bool Conf_AddServer PARAMS(( char *Name, UINT16 Port, char *Host, char *MyPwd, char *PeerPwd ));
+GLOBAL bool Conf_DisableServer PARAMS(( const char *Name ));
+GLOBAL bool Conf_AddServer PARAMS(( const char *Name, UINT16 Port, const char *Host, const char *MyPwd, const char *PeerPwd ));
-GLOBAL bool Conf_IsService PARAMS((int ConfServer, char *Nick));
+GLOBAL bool Conf_IsService PARAMS((int ConfServer, const char *Nick));
#endif
blob - 826383b0732a310d6ef6837756e5694c2d595a71
blob + d77222351a686ceee60ef7b94beea035552830a1
--- src/ngircd/conn-zip.c
+++ src/ngircd/conn-zip.c
* @param Len Length of the data to add.
* @return true on success, false otherwise. */
GLOBAL bool
-Zip_Buffer( CONN_ID Idx, char *Data, size_t Len )
+Zip_Buffer( CONN_ID Idx, const char *Data, size_t Len )
{
size_t buflen;
blob - 6458a4e2d12a90991cc53c7f5f4fecaf291c2b54
blob + 08abb50ca70fa542d943bbcd4388ab4c1c713301
--- src/ngircd/conn-zip.h
+++ src/ngircd/conn-zip.h
GLOBAL bool Zip_InitConn PARAMS(( CONN_ID Idx ));
-GLOBAL bool Zip_Buffer PARAMS(( CONN_ID Idx, char *Data, size_t Len ));
+GLOBAL bool Zip_Buffer PARAMS(( CONN_ID Idx, const char *Data, size_t Len ));
GLOBAL bool Zip_Flush PARAMS(( CONN_ID Idx ));
GLOBAL bool Unzip_Buffer PARAMS(( CONN_ID Idx ));
blob - 5b5251127bde9a7464328e7f40dac4754b6787f6
blob + c27cebf9a7b74301c219f03f1e10332df45f7b15
--- src/ngircd/conn.c
+++ src/ngircd/conn.c
GLOBAL void
-Conn_Close( CONN_ID Idx, char *LogMsg, char *FwdMsg, bool InformClient )
+Conn_Close( CONN_ID Idx, const char *LogMsg, const char *FwdMsg, bool InformClient )
{
/* Close connection. Open pipes of asyncronous resolver
* sub-processes are closed down. */
CLIENT *c;
- char *txt;
+ const char *txt;
double in_k, out_k;
UINT16 port;
#ifdef ZLIB
blob - 450d3d10497c7fffbff4fdf013ff2b680156fa1c
blob + 28bbda357860efdcbf938afc127b296c480bd389
--- src/ngircd/conn.h
+++ src/ngircd/conn.h
GLOBAL bool Conn_WriteStr PARAMS(( CONN_ID Idx, char *Format, ... ));
-GLOBAL void Conn_Close PARAMS(( CONN_ID Idx, char *LogMsg, char *FwdMsg, bool InformClient ));
+GLOBAL void Conn_Close PARAMS(( CONN_ID Idx, const char *LogMsg, const char *FwdMsg, bool InformClient ));
GLOBAL void Conn_SyncServerStruct PARAMS(( void ));