Make Channel_Part name and reason parameters 'const'.

This commit is contained in:
Florian Westphal 2008-02-05 16:31:35 +00:00
parent 000a227a74
commit cb0d594e61
2 changed files with 9 additions and 9 deletions

View File

@ -17,7 +17,7 @@
#include "portab.h" #include "portab.h"
static char UNUSED id[] = "$Id: channel.c,v 1.64 2008/01/15 22:28:14 fw Exp $"; static char UNUSED id[] = "$Id: channel.c,v 1.65 2008/02/05 16:31:35 fw Exp $";
#include "imp.h" #include "imp.h"
#include <assert.h> #include <assert.h>
@ -56,7 +56,7 @@ static CL2CHAN *My_Cl2Chan;
static CL2CHAN *Get_Cl2Chan PARAMS(( CHANNEL *Chan, CLIENT *Client )); static CL2CHAN *Get_Cl2Chan PARAMS(( CHANNEL *Chan, CLIENT *Client ));
static CL2CHAN *Add_Client PARAMS(( CHANNEL *Chan, CLIENT *Client )); static CL2CHAN *Add_Client PARAMS(( CHANNEL *Chan, CLIENT *Client ));
static bool Remove_Client PARAMS(( int Type, CHANNEL *Chan, CLIENT *Client, CLIENT *Origin, char *Reason, bool InformServer )); static bool Remove_Client PARAMS(( int Type, CHANNEL *Chan, CLIENT *Client, CLIENT *Origin, const char *Reason, bool InformServer ));
static CL2CHAN *Get_First_Cl2Chan PARAMS(( CLIENT *Client, CHANNEL *Chan )); static CL2CHAN *Get_First_Cl2Chan PARAMS(( CLIENT *Client, CHANNEL *Chan ));
static CL2CHAN *Get_Next_Cl2Chan PARAMS(( CL2CHAN *Start, CLIENT *Client, CHANNEL *Chan )); static CL2CHAN *Get_Next_Cl2Chan PARAMS(( CL2CHAN *Start, CLIENT *Client, CHANNEL *Chan ));
static bool Delete_Channel PARAMS(( CHANNEL *Chan )); static bool Delete_Channel PARAMS(( CHANNEL *Chan ));
@ -202,7 +202,7 @@ Channel_Join( CLIENT *Client, char *Name )
GLOBAL bool GLOBAL bool
Channel_Part( CLIENT *Client, CLIENT *Origin, char *Name, char *Reason ) Channel_Part( CLIENT *Client, CLIENT *Origin, const char *Name, const char *Reason )
{ {
CHANNEL *chan; CHANNEL *chan;
@ -388,7 +388,7 @@ Channel_Next( CHANNEL *Chan )
GLOBAL CHANNEL * GLOBAL CHANNEL *
Channel_Search( char *Name ) Channel_Search( const char *Name )
{ {
/* Channel-Struktur suchen */ /* Channel-Struktur suchen */
@ -829,7 +829,7 @@ Add_Client( CHANNEL *Chan, CLIENT *Client )
static bool static bool
Remove_Client( int Type, CHANNEL *Chan, CLIENT *Client, CLIENT *Origin, char *Reason, bool InformServer ) Remove_Client( int Type, CHANNEL *Chan, CLIENT *Client, CLIENT *Origin, const char *Reason, bool InformServer )
{ {
CL2CHAN *cl2chan, *last_cl2chan; CL2CHAN *cl2chan, *last_cl2chan;
CHANNEL *c; CHANNEL *c;
@ -903,7 +903,7 @@ Remove_Client( int Type, CHANNEL *Chan, CLIENT *Client, CLIENT *Origin, char *Re
{ {
if( ! Get_First_Cl2Chan( NULL, Chan )) Delete_Channel( Chan ); if( ! Get_First_Cl2Chan( NULL, Chan )) Delete_Channel( Chan );
} }
return true; return true;
} /* Remove_Client */ } /* Remove_Client */

View File

@ -8,7 +8,7 @@
* (at your option) any later version. * (at your option) any later version.
* Please read the file COPYING, README and AUTHORS for more information. * Please read the file COPYING, README and AUTHORS for more information.
* *
* $Id: channel.h,v 1.34 2008/01/15 22:28:14 fw Exp $ * $Id: channel.h,v 1.35 2008/02/05 16:31:35 fw Exp $
* *
* Channel management (header) * Channel management (header)
*/ */
@ -64,7 +64,7 @@ GLOBAL void Channel_InitPredefined PARAMS(( void ));
GLOBAL void Channel_Exit PARAMS(( void )); GLOBAL void Channel_Exit PARAMS(( void ));
GLOBAL bool Channel_Join PARAMS(( CLIENT *Client, char *Name )); GLOBAL bool Channel_Join PARAMS(( CLIENT *Client, char *Name ));
GLOBAL bool Channel_Part PARAMS(( CLIENT *Client, CLIENT *Origin, char *Name, char *Reason )); 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, char *Reason ));
@ -85,7 +85,7 @@ GLOBAL void Channel_SetModes PARAMS(( CHANNEL *Chan, char *Modes ));
GLOBAL void Channel_SetKey PARAMS(( CHANNEL *Chan, char *Key )); GLOBAL void Channel_SetKey PARAMS(( CHANNEL *Chan, char *Key ));
GLOBAL void Channel_SetMaxUsers PARAMS(( CHANNEL *Chan, unsigned long Count )); GLOBAL void Channel_SetMaxUsers PARAMS(( CHANNEL *Chan, unsigned long Count ));
GLOBAL CHANNEL *Channel_Search PARAMS(( char *Name )); GLOBAL CHANNEL *Channel_Search PARAMS(( const char *Name ));
GLOBAL CHANNEL *Channel_First PARAMS(( void )); GLOBAL CHANNEL *Channel_First PARAMS(( void ));
GLOBAL CHANNEL *Channel_Next PARAMS(( CHANNEL *Chan )); GLOBAL CHANNEL *Channel_Next PARAMS(( CHANNEL *Chan ));