commit - 61966a6088f770ff28b6209a484b44aaf478dbd6
commit + 6e105bf87ee5008f32b7557eea2977deb8d10a71
blob - 5e3b9a802dc1d4ad28a8d7e6753ea792066675ca
blob + d05095bb821f489bbc492b2541ce2626f15aa7de
--- src/ngircd/channel.c
+++ src/ngircd/channel.c
#include "portab.h"
-static char UNUSED id[] = "$Id: channel.c,v 1.58 2006/10/02 21:55:49 fw Exp $";
+static char UNUSED id[] = "$Id: channel.c,v 1.59 2006/10/06 21:32:58 fw Exp $";
#include "imp.h"
#include <assert.h>
} /* Channel_Quit */
-GLOBAL long
+GLOBAL unsigned long
Channel_Count( void )
{
CHANNEL *c;
- long count = 0;
+ unsigned long count = 0;
c = My_Channels;
while( c )
} /* Channel_Count */
-GLOBAL long
+GLOBAL unsigned long
Channel_MemberCount( CHANNEL *Chan )
{
CL2CHAN *cl2chan;
- long count = 0;
+ unsigned long count = 0;
assert( Chan != NULL );
} /* Channel_PCount */
-GLOBAL char *
-Channel_Name( CHANNEL *Chan )
+GLOBAL const char *
+Channel_Name( const CHANNEL *Chan )
{
assert( Chan != NULL );
return Chan->name;
} /* Channel_Key */
-GLOBAL long
+GLOBAL unsigned long
Channel_MaxUsers( CHANNEL *Chan )
{
assert( Chan != NULL );
GLOBAL void
-Channel_SetMaxUsers( CHANNEL *Chan, long Count )
+Channel_SetMaxUsers(CHANNEL *Chan, unsigned long Count)
{
assert( Chan != NULL );
ok = true;
if( strchr( Channel_Modes( Chan ), 'n' ) && ( ! is_member )) ok = false;
if( strchr( Channel_Modes( Chan ), 'm' ) && ( ! is_op ) && ( ! has_voice )) ok = false;
-
+
/* Is the client banned? */
if( Lists_CheckBanned( From, Chan ))
{
blob - 3dc3c59042bdb85a4c91efc242d538bb15e9380c
blob + e6e3d40e51e32222376576f8d16d0eab05e8e1ed
--- src/ngircd/channel.h
+++ src/ngircd/channel.h
* (at your option) any later version.
* Please read the file COPYING, README and AUTHORS for more information.
*
- * $Id: channel.h,v 1.30 2006/10/02 21:55:50 fw Exp $
+ * $Id: channel.h,v 1.31 2006/10/06 21:32:58 fw Exp $
*
* Channel management (header)
*/
char topic_who[CLIENT_NICK_LEN];/* Nickname of user that set topic */
#endif
char key[CLIENT_PASS_LEN]; /* Channel key ("password", mode "k" ) */
- long maxusers; /* Maximum number of members (mode "l") */
+ unsigned long maxusers; /* Maximum number of members (mode "l") */
} CHANNEL;
typedef struct _CLIENT2CHAN
GLOBAL void Channel_Kick PARAMS(( CLIENT *Client, CLIENT *Origin, char *Name, char *Reason ));
-GLOBAL long Channel_Count PARAMS(( void ));
-GLOBAL long Channel_MemberCount PARAMS(( CHANNEL *Chan ));
+GLOBAL unsigned long Channel_Count PARAMS(( void ));
+GLOBAL unsigned long Channel_MemberCount PARAMS(( CHANNEL *Chan ));
GLOBAL int Channel_CountForUser PARAMS(( CLIENT *Client ));
GLOBAL int Channel_PCount PARAMS(( void ));
-GLOBAL char *Channel_Name PARAMS(( CHANNEL *Chan ));
+GLOBAL const char *Channel_Name PARAMS(( const CHANNEL *Chan ));
GLOBAL char *Channel_Modes PARAMS(( CHANNEL *Chan ));
GLOBAL char *Channel_Topic PARAMS(( CHANNEL *Chan ));
GLOBAL char *Channel_Key PARAMS(( CHANNEL *Chan ));
-GLOBAL long Channel_MaxUsers PARAMS(( CHANNEL *Chan ));
+GLOBAL unsigned long Channel_MaxUsers PARAMS(( CHANNEL *Chan ));
GLOBAL void Channel_SetTopic PARAMS(( CHANNEL *Chan, CLIENT *Client, char *Topic ));
GLOBAL void Channel_SetModes PARAMS(( CHANNEL *Chan, char *Modes ));
GLOBAL void Channel_SetKey PARAMS(( CHANNEL *Chan, char *Key ));
-GLOBAL void Channel_SetMaxUsers PARAMS(( CHANNEL *Chan, long Count ));
+GLOBAL void Channel_SetMaxUsers PARAMS(( CHANNEL *Chan, unsigned long Count ));
GLOBAL CHANNEL *Channel_Search PARAMS(( char *Name ));
blob - f0b89f8c8402d383cc6ba0d45e45448db38f82bf
blob + f30df91acdadb984be809d00c3032becdb9a0eb8
--- src/ngircd/irc-channel.c
+++ src/ngircd/irc-channel.c
#include "portab.h"
-static char UNUSED id[] = "$Id: irc-channel.c,v 1.36 2006/10/05 18:26:54 fw Exp $";
+static char UNUSED id[] = "$Id: irc-channel.c,v 1.37 2006/10/06 21:32:58 fw Exp $";
#include "imp.h"
#include <assert.h>
{
if( *ptr == 'l' )
{
- snprintf( l, sizeof( l ), " %ld", Channel_MaxUsers( chan ));
+ snprintf( l, sizeof( l ), " %lu", Channel_MaxUsers( chan ));
strlcat( modes_add, l, sizeof( modes_add ));
}
if( *ptr == 'k' )
blob - 396d62e9df7f6dcbd3b539b6e76fcaed67a74e72
blob + ac9e9d805ae790700f45a85931775804c53b3476
--- src/ngircd/irc-info.c
+++ src/ngircd/irc-info.c
#include "portab.h"
-static char UNUSED id[] = "$Id: irc-info.c,v 1.35 2006/10/01 19:13:32 alex Exp $";
+static char UNUSED id[] = "$Id: irc-info.c,v 1.36 2006/10/06 21:32:58 fw Exp $";
#include "imp.h"
#include <assert.h>
IRC_WHO( CLIENT *Client, REQUEST *Req )
{
bool ok, only_ops;
- char flags[8], *ptr;
+ char flags[8];
+ const char *ptr;
CL2CHAN *cl2chan;
CHANNEL *chan, *cn;
CLIENT *c;
blob - fa3730813e98eaf2b88f511f5f40e149b23aefb2
blob + 038e13dfa4f42319619f2def78ecaff9124f12bc
--- src/ngircd/irc-mode.c
+++ src/ngircd/irc-mode.c
#include "portab.h"
-static char UNUSED id[] = "$Id: irc-mode.c,v 1.46 2006/08/12 11:56:24 fw Exp $";
+static char UNUSED id[] = "$Id: irc-mode.c,v 1.47 2006/10/06 21:32:58 fw Exp $";
#include "imp.h"
#include <assert.h>
switch( *mode_ptr )
{
case 'l':
- snprintf( argadd, sizeof( argadd ), " %ld", Channel_MaxUsers( Channel ));
+ snprintf( argadd, sizeof( argadd ), " %lu", Channel_MaxUsers( Channel ));
strlcat( the_args, argadd, sizeof( the_args ));
break;
case 'k':
blob - b8681b9c44442e8028e60d56fb3a970721a611be
blob + 3d64e1fe7ccfc6c56358be9e1ba55eb884a0496f
--- src/ngircd/irc-server.c
+++ src/ngircd/irc-server.c
#include "portab.h"
-static char UNUSED id[] = "$Id: irc-server.c,v 1.40 2006/10/01 19:05:02 alex Exp $";
+static char UNUSED id[] = "$Id: irc-server.c,v 1.41 2006/10/06 21:32:58 fw Exp $";
#include "imp.h"
#include <assert.h>
else
{
/* "CHANINFO <chan> +<modes> <key> <limit> :<topic>" */
- if( ! IRC_WriteStrClient( Client, "CHANINFO %s +%s %s %ld :%s", Channel_Name( chan ), modes, strchr( Channel_Modes( chan ), 'k' ) ? Channel_Key( chan ) : "*", strchr( Channel_Modes( chan ), 'l' ) ? Channel_MaxUsers( chan ) : 0L, topic )) return DISCONNECTED;
+ if( ! IRC_WriteStrClient( Client, "CHANINFO %s +%s %s %lu :%s",
+ Channel_Name( chan ), modes,
+ strchr( Channel_Modes( chan ), 'k' ) ? Channel_Key( chan ) : "*",
+ strchr( Channel_Modes( chan ), 'l' ) ? Channel_MaxUsers( chan ) : 0UL, topic ))
+ {
+ return DISCONNECTED;
+ }
}
}
}
blob - aed2d252006b93256e83c8af339aa9edd73213ce
blob + bc68373bda101b14f81cb8d9f708b4ee3368abfa
--- src/ngircd/messages.h
+++ src/ngircd/messages.h
* (at your option) any later version.
* Please read the file COPYING, README and AUTHORS for more information.
*
- * $Id: messages.h,v 1.69 2006/10/01 19:13:32 alex Exp $
+ * $Id: messages.h,v 1.70 2006/10/06 21:32:58 fw Exp $
*
* IRC numerics (Header)
*/
#define RPL_LUSERCLIENT_MSG "251 %s :There are %ld users and %ld services on %ld servers"
#define RPL_LUSEROP_MSG "252 %s %ld :operator(s) online"
#define RPL_LUSERUNKNOWN_MSG "253 %s %ld :unknown connection(s)"
-#define RPL_LUSERCHANNELS_MSG "254 %s %ld :channels formed"
+#define RPL_LUSERCHANNELS_MSG "254 %s %lu :channels formed"
#define RPL_LUSERME_MSG "255 %s :I have %ld users, %ld services and %ld servers"
#define RPL_ADMINME_MSG "256 %s %s :Administrative info"
#define RPL_ADMINLOC1_MSG "257 %s :%s"