[srvx-commits] CVS: services/src modcmd.h,1.18,1.19 gline.c,1.34,1.35 expnhelp.c,1.8,1.9 checkdb.c,1
Brought to you by:
entrope
|
From: Entrope <en...@us...> - 2003-07-22 16:33:51
|
Update of /cvsroot/srvx/services/src
In directory sc8-pr-cvs1:/tmp/cvs-serv24423/src
Modified Files:
modcmd.h gline.c expnhelp.c checkdb.c chanserv.h chanserv.c
Log Message:
switch from (void)argname; in function body to
UNUSED_ARG(type argname) in parameter list
simplify the CTCP ACTION check
Index: modcmd.h
===================================================================
RCS file: /cvsroot/srvx/services/src/modcmd.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -r1.18 -r1.19
*** modcmd.h 12 Jul 2003 03:48:37 -0000 1.18
--- modcmd.h 22 Jul 2003 16:33:44 -0000 1.19
***************
*** 31,35 ****
struct modcmd;
! #define MODCMD_FUNC(NAME) int NAME(struct userNode *user, UNUSED_ARG(struct chanNode *channel), UNUSED_ARG(unsigned int argc), unsigned char *argv[], UNUSED_ARG(struct svccmd *cmd))
typedef MODCMD_FUNC(modcmd_func_t);
--- 31,35 ----
struct modcmd;
! #define MODCMD_FUNC(NAME) int NAME(struct userNode *user, UNUSED_ARG(struct chanNode *channel), UNUSED_ARG(unsigned int argc), UNUSED_ARG(unsigned char *argv[]), UNUSED_ARG(struct svccmd *cmd))
typedef MODCMD_FUNC(modcmd_func_t);
***************
*** 39,43 ****
#if defined(__GNUC__) && (__GNUC__ < 3)
#define reply(FMT...) send_message(user, cmd->parent->bot, FMT)
! #else
#define reply(...) send_message(user, cmd->parent->bot, __VA_ARGS__)
#endif
--- 39,43 ----
#if defined(__GNUC__) && (__GNUC__ < 3)
#define reply(FMT...) send_message(user, cmd->parent->bot, FMT)
! #elif !defined(S_SPLINT_S) /* doesn't recognize C99 variadic macros */
#define reply(...) send_message(user, cmd->parent->bot, __VA_ARGS__)
#endif
Index: gline.c
===================================================================
RCS file: /cvsroot/srvx/services/src/gline.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -C2 -r1.34 -r1.35
*** gline.c 7 Jul 2003 16:29:33 -0000 1.34
--- gline.c 22 Jul 2003 16:33:44 -0000 1.35
***************
*** 58,74 ****
static int
! gline_for_p(void *key, void *data, void *extra)
{
struct gline *ge = data;
- (void)key;
return !irccasecmp(ge->target, extra);
}
static int
! delete_gline_for_p(void *key, void *data, void *extra)
{
struct gline *ge = data;
- (void)key;
if (!irccasecmp(ge->target, extra)) {
free_gline(ge);
--- 58,72 ----
static int
! gline_for_p(UNUSED_ARG(void *key), void *data, void *extra)
{
struct gline *ge = data;
return !irccasecmp(ge->target, extra);
}
static int
! delete_gline_for_p(UNUSED_ARG(void *key), void *data, void *extra)
{
struct gline *ge = data;
if (!irccasecmp(ge->target, extra)) {
free_gline(ge);
***************
*** 80,89 ****
static void
! gline_expire(void *data)
{
time_t stopped;
void *wraa;
- (void)data;
stopped = 0;
while (heap_size(gline_heap)) {
--- 78,86 ----
static void
! gline_expire(UNUSED_ARG(void *data))
{
time_t stopped;
void *wraa;
stopped = 0;
while (heap_size(gline_heap)) {
***************
*** 155,162 ****
static int
! gline_refresh_helper(void *key, void *data, void *extra)
{
struct gline *ge = data;
- (void)key;
irc_gline(extra, ge);
return 0;
--- 152,158 ----
static int
! gline_refresh_helper(UNUSED_ARG(void *key), void *data, void *extra)
{
struct gline *ge = data;
irc_gline(extra, ge);
return 0;
***************
*** 182,186 ****
static int
! gline_add_record(const char *key, void *data, void *extra)
{
struct record_data *rd = data;
--- 178,182 ----
static int
! gline_add_record(const char *key, void *data, UNUSED_ARG(void *extra))
{
struct record_data *rd = data;
***************
*** 188,192 ****
time_t issued, expiration;
- (void)extra;
if (!(reason = database_get_data(rd->d.object, KEY_REASON, RECDB_QSTRING))) {
log_module(MAIN_LOG, LOG_ERROR, "Missing reason for gline %s", key);
--- 184,187 ----
***************
*** 217,226 ****
static int
! gline_write_entry(void *key, void *data, void *extra)
{
struct gline *ent = data;
struct saxdb_context *ctx = extra;
- (void)key;
saxdb_start_record(ctx, ent->target, 0);
saxdb_write_int(ctx, KEY_EXPIRES, ent->expires);
--- 212,220 ----
static int
! gline_write_entry(UNUSED_ARG(void *key), void *data, void *extra)
{
struct gline *ent = data;
struct saxdb_context *ctx = extra;
saxdb_start_record(ctx, ent->target, 0);
saxdb_write_int(ctx, KEY_EXPIRES, ent->expires);
***************
*** 340,349 ****
static int
! gline_search_helper(void *key, void *data, void *extra)
{
struct gline *gline = data;
struct gline_search *search = extra;
- (void)key;
if (gline_discrim_match(gline, search->discrim)
&& (search->hits++ < search->discrim->limit)) {
--- 334,342 ----
static int
! gline_search_helper(UNUSED_ARG(void *key), void *data, void *extra)
{
struct gline *gline = data;
struct gline_search *search = extra;
if (gline_discrim_match(gline, search->discrim)
&& (search->hits++ < search->discrim->limit)) {
Index: expnhelp.c
===================================================================
RCS file: /cvsroot/srvx/services/src/expnhelp.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** expnhelp.c 6 Jul 2003 03:25:31 -0000 1.8
--- expnhelp.c 22 Jul 2003 16:33:44 -0000 1.9
***************
*** 4,11 ****
/* because recdb likes to log stuff.. */
struct log_type *MAIN_LOG;
! void log_module(struct log_type *lt, enum log_severity ls, const char *format, ...)
{
va_list va;
- (void)lt; (void)ls;
va_start(va, format);
vfprintf(stderr, format, va);
--- 4,10 ----
/* because recdb likes to log stuff.. */
struct log_type *MAIN_LOG;
! void log_module(UNUSED_ARG(struct log_type *lt), UNUSED_ARG(enum log_severity ls), const char *format, ...)
{
va_list va;
va_start(va, format);
vfprintf(stderr, format, va);
Index: checkdb.c
===================================================================
RCS file: /cvsroot/srvx/services/src/checkdb.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** checkdb.c 6 Jul 2003 03:25:31 -0000 1.13
--- checkdb.c 22 Jul 2003 16:33:44 -0000 1.14
***************
*** 8,15 ****
/* because recdb likes to log stuff.. */
! void log_module(struct log_type *lt, enum log_severity ls, const char *format, ...)
{
va_list va;
- (void)lt; (void)ls;
va_start(va, format);
vfprintf(stderr, format, va);
--- 8,14 ----
/* because recdb likes to log stuff.. */
! void log_module(UNUSED_ARG(struct log_type *lt), UNUSED_ARG(enum log_severity ls), const char *format, ...)
{
va_list va;
va_start(va, format);
vfprintf(stderr, format, va);
***************
*** 22,68 ****
time_t now;
! void *conf_get_data(const char *full_path, enum recdb_type type) {
! (void)full_path; (void)type; return NULL;
}
! void conf_register_reload(conf_reload_func crf) {
! (void)crf;
}
! void reg_exit_func(exit_func_t handler) {
! (void)handler;
}
! void timeq_add(time_t when, timeq_func func, void *data) {
! (void)when; (void)func; (void)data;
}
! void timeq_del(time_t when, timeq_func func, void *data, int mask) {
! (void)when; (void)func; (void)data; (void)mask;
}
!
! int send_message(struct userNode *dest, struct userNode *src, const char *message, ...) {
! (void)dest; (void)src; (void)message; return 0;
}
! struct module *module_register(const char *name, enum log_type clog, const char *helpfile_name, expand_func_t expand_help) {
! (void)name; (void)clog; (void)helpfile_name; (void)expand_help; return NULL;
}
! struct modcmd *modcmd_register(struct module *module, const char *name, modcmd_func_t func, unsigned int min_argc, unsigned int flags, ...) {
! (void)module; (void)name; (void)func; (void)min_argc; (void)flags; return NULL;
}
! void table_send(struct userNode *from, const char *to, unsigned int size, irc_send_func irc_send, struct helpfile_table table) {
! (void)from; (void)to; (void)size; (void)irc_send; (void)table;
}
/* back to our regularly scheduled code: */
! int check_record(const char *key, void *data, void *extra)
{
struct record_data *rd = data;
- (void)extra;
switch (rd->type) {
case RECDB_INVALID:
--- 21,60 ----
time_t now;
! void *conf_get_data(UNUSED_ARG(const char *full_path), UNUSED_ARG(enum recdb_type type)) {
! return NULL;
}
! void conf_register_reload(UNUSED_ARG(conf_reload_func crf)) {
}
! void reg_exit_func(UNUSED_ARG(exit_func_t handler)) {
}
! void timeq_add(UNUSED_ARG(time_t when), UNUSED_ARG(timeq_func func), UNUSED_ARG(void *data)) {
}
! void timeq_del(UNUSED_ARG(time_t when), UNUSED_ARG(timeq_func func), UNUSED_ARG(void *data), UNUSED_ARG(int mask)) {
}
! int send_message(UNUSED_ARG(struct userNode *dest), UNUSED_ARG(struct userNode *src), UNUSED_ARG(const char *message), ...) {
! return 0;
}
! struct module *module_register(UNUSED_ARG(const char *name), UNUSED_ARG(enum log_type clog), UNUSED_ARG(const char *helpfile_name), UNUSED_ARG(expand_func_t expand_help)) {
! return NULL;
}
! struct modcmd *modcmd_register(UNUSED_ARG(struct module *module), UNUSED_ARG(const char *name), UNUSED_ARG(modcmd_func_t func), UNUSED_ARG(unsigned int min_argc), UNUSED_ARG(unsigned int flags), ...) {
! return NULL;
}
! void table_send(UNUSED_ARG(struct userNode *from), UNUSED_ARG(const char *to), UNUSED_ARG(unsigned int size), UNUSED_ARG(irc_send_func irc_send), UNUSED_ARG(struct helpfile_table table)) {
}
/* back to our regularly scheduled code: */
! int check_record(const char *key, void *data, UNUSED_ARG(void *extra))
{
struct record_data *rd = data;
switch (rd->type) {
case RECDB_INVALID:
Index: chanserv.h
===================================================================
RCS file: /cvsroot/srvx/services/src/chanserv.h,v
retrieving revision 1.47
retrieving revision 1.48
diff -C2 -r1.47 -r1.48
*** chanserv.h 8 Jul 2003 03:43:56 -0000 1.47
--- chanserv.h 22 Jul 2003 16:33:44 -0000 1.48
***************
*** 177,216 ****
};
- enum note_access_type
- {
- NOTE_SET_CHANNEL_ACCESS,
- NOTE_SET_CHANNEL_SETTER,
- NOTE_SET_PRIVILEGED
- };
-
- enum note_visible_type
- {
- NOTE_VIS_ALL,
- NOTE_VIS_CHANNEL_USERS,
- NOTE_VIS_PRIVILEGED
- };
-
- struct note_type
- {
- enum note_access_type set_access_type;
- union {
- unsigned int min_opserv;
- enum userLevel min_ulevel;
- } set_access;
- enum note_visible_type visible_type;
- unsigned int max_length;
- unsigned int refs;
- char name[1];
- };
-
- extern dict_t note_types; /* (struct note_type*)->name -> (struct note_type*) */
-
- struct note
- {
- struct note_type *type;
- char setter[NICKSERV_HANDLE_LEN+1];
- char note[1];
- };
-
struct do_not_register
{
--- 177,180 ----
Index: chanserv.c
===================================================================
RCS file: /cvsroot/srvx/services/src/chanserv.c,v
retrieving revision 1.366
retrieving revision 1.367
diff -C2 -r1.366 -r1.367
*** chanserv.c 15 Jul 2003 03:35:26 -0000 1.366
--- chanserv.c 22 Jul 2003 16:33:45 -0000 1.367
***************
*** 469,472 ****
--- 469,506 ----
};
+ enum note_access_type
+ {
+ NOTE_SET_CHANNEL_ACCESS,
+ NOTE_SET_CHANNEL_SETTER,
+ NOTE_SET_PRIVILEGED
+ };
+
+ enum note_visible_type
+ {
+ NOTE_VIS_ALL,
+ NOTE_VIS_CHANNEL_USERS,
+ NOTE_VIS_PRIVILEGED
+ };
+
+ struct note_type
+ {
+ enum note_access_type set_access_type;
+ union {
+ unsigned int min_opserv;
+ enum userLevel min_ulevel;
+ } set_access;
+ enum note_visible_type visible_type;
+ unsigned int max_length;
+ unsigned int refs;
+ char name[1];
+ };
+
+ struct note
+ {
+ struct note_type *type;
+ char setter[NICKSERV_HANDLE_LEN+1];
+ char note[1];
+ };
+
static unsigned int registered_channels;
static unsigned int userCount[USER_LEVEL_HIGHEST + 1];
***************
*** 666,673 ****
static void
! chanserv_ctcp_check(struct userNode *user, struct chanNode *channel, char *text, struct userNode *bot)
{
- size_t tlen;
- char *spc;
struct userData *uData;
enum userLevel minlvl;
--- 700,705 ----
static void
! chanserv_ctcp_check(struct userNode *user, struct chanNode *channel, char *text, UNUSED_ARG(struct userNode *bot))
{
struct userData *uData;
enum userLevel minlvl;
***************
*** 676,690 ****
static char bad_ctcp_reason[] = CSMSG_BAD_CTCP_REASON;
- (void)bot;
/* Bail early if channel is inactive or doesn't restrict CTCPs, or sender is a service */
if(!channel->channel_info || IsSuspended(channel->channel_info)) return;
if(channel->channel_info->options[optCTCPUsers] == 'a') return;
if(IsService(user)) return;
! /* Parse out CTCP type, and exit if it's an ACTION */
! tlen = strlen(text);
! spc = memchr(text, ' ', tlen);
! if(spc) *spc = 0;
! else if(text[tlen-1] == '\001') text[tlen-1] = 0;
! if(!irccasecmp(text, "ACTION")) return;
/* Figure out the minimum level needed to CTCP the channel */
switch(channel->channel_info->options[optCTCPUsers]) {
--- 708,716 ----
static char bad_ctcp_reason[] = CSMSG_BAD_CTCP_REASON;
/* Bail early if channel is inactive or doesn't restrict CTCPs, or sender is a service */
if(!channel->channel_info || IsSuspended(channel->channel_info)) return;
if(channel->channel_info->options[optCTCPUsers] == 'a') return;
if(IsService(user)) return;
! if(!ircncasecmp(text, "\001ACTION ", 8)) return;
/* Figure out the minimum level needed to CTCP the channel */
switch(channel->channel_info->options[optCTCPUsers]) {
***************
*** 744,748 ****
}
! void
chanserv_flush_note_type(struct note_type *ntype)
{
--- 770,774 ----
}
! static void
chanserv_flush_note_type(struct note_type *ntype)
{
***************
*** 753,757 ****
}
! void
chanserv_truncate_notes(struct note_type *ntype)
{
--- 779,783 ----
}
! static void
chanserv_truncate_notes(struct note_type *ntype)
{
***************
*** 1107,1116 ****
static int
! append_entry(const char *key, void *data, void *extra)
{
struct helpfile_expansion *exp = extra;
int row;
- (void)data;
row = exp->value.table.length++;
exp->value.table.contents[row] = calloc(1, sizeof(char*));
--- 1133,1141 ----
static int
! append_entry(const char *key, UNUSED_ARG(void *data), void *extra)
{
struct helpfile_expansion *exp = extra;
int row;
row = exp->value.table.length++;
exp->value.table.contents[row] = calloc(1, sizeof(char*));
***************
*** 1497,1501 ****
static void
! expire_channels(void *data)
{
struct chanData *channel, *next;
--- 1522,1526 ----
static void
! expire_channels(UNUSED_ARG(void *data))
{
struct chanData *channel, *next;
***************
*** 1504,1508 ****
char delay[INTERVALLEN], reason[INTERVALLEN + 64];
int suspended;
- (void)data;
intervalString(delay, chanserv_conf.channel_expire_delay);
--- 1529,1532 ----
***************
*** 2401,2405 ****
static CHANSERV_FUNC(cmd_opchan)
{
- (void)argv; (void)argc;
if(!IsPrivileged(user) && !channel->channel_info->may_opchan)
{
--- 2425,2428 ----
***************
*** 2752,2756 ****
struct userData *uData;
struct modeNode *mn;
- (void)argv; /* weeeeeeeeeeeeeeeeeeeeeeee */
mn = GetUserMode(channel, user);
--- 2775,2778 ----
***************
*** 2795,2799 ****
char change[MAXLEN];
struct modeNode *mn;
- (void)argv;(void)argc;
mn = GetUserMode(channel, user);
--- 2817,2820 ----
***************
*** 2823,2830 ****
}
! static int cmd_all(struct userNode *user, struct chanNode *channel, unsigned int argc, unsigned char *argv[], struct svccmd *cmd, modcmd_func_t mcmd)
{
struct chanList *cList;
- (void)channel; (void)argc; (void)argv;
for(cList = user->handle_info->channels; cList; cList = cList->next)
--- 2844,2850 ----
}
! static int cmd_all(struct userNode *user, UNUSED_ARG(struct chanNode *channel), UNUSED_ARG(unsigned int argc), UNUSED_ARG(unsigned char *argv[]), struct svccmd *cmd, modcmd_func_t mcmd)
{
struct chanList *cList;
for(cList = user->handle_info->channels; cList; cList = cList->next)
***************
*** 2858,2867 ****
static int
! modify_users(struct userNode *user, struct chanNode *channel, unsigned int argc, unsigned char *argv[], struct svccmd *cmd, validate_func_t validate, process_func_t process, char *action)
{
unsigned int i = 0, valid = 0, invalid = 0;
struct userNode *victim, **victims;
! REQUIRE_PARAMS(2); (void)cmd;
victims = alloca(sizeof(struct userNode *) * (argc - 1));
--- 2878,2887 ----
static int
! modify_users(struct userNode *user, struct chanNode *channel, unsigned int argc, unsigned char *argv[], UNUSED_ARG(struct svccmd *cmd), validate_func_t validate, process_func_t process, char *action)
{
unsigned int i = 0, valid = 0, invalid = 0;
struct userNode *victim, **victims;
! REQUIRE_PARAMS(2);
victims = alloca(sizeof(struct userNode *) * (argc - 1));
***************
*** 2955,2959 ****
static int
! eject_user(struct userNode *user, struct chanNode *channel, unsigned int argc, unsigned char *argv[], struct svccmd *cmd, int action)
{
struct userNode *victim, **victims;
--- 2975,2979 ----
static int
! eject_user(struct userNode *user, struct chanNode *channel, unsigned int argc, unsigned char *argv[], UNUSED_ARG(struct svccmd *cmd), int action)
{
struct userNode *victim, **victims;
***************
*** 2962,2966 ****
offset = (action & ACTION_ADD_TIMED_BAN) ? 3 : 2;
! REQUIRE_PARAMS(offset); (void)cmd;
if(argc > offset)
{
--- 2982,2986 ----
offset = (action & ACTION_ADD_TIMED_BAN) ? 3 : 2;
! REQUIRE_PARAMS(offset);
if(argc > offset)
{
***************
*** 3263,3267 ****
static int
! unban_user(struct userNode *user, struct chanNode *channel, unsigned int argc, unsigned char *argv[], struct svccmd *cmd, int action)
{
struct userNode *actee;
--- 3283,3287 ----
static int
! unban_user(struct userNode *user, struct chanNode *channel, unsigned int argc, unsigned char *argv[], UNUSED_ARG(struct svccmd *cmd), int action)
{
struct userNode *actee;
***************
*** 3269,3273 ****
int acted = 0;
! REQUIRE_PARAMS(2); (void)cmd;
/* may want to allow a comma delimited list of users... */
--- 3289,3293 ----
int acted = 0;
! REQUIRE_PARAMS(2);
/* may want to allow a comma delimited list of users... */
***************
*** 3379,3383 ****
long flags = ACTION_UNBAN;
- (void)argc;
/* remove permanent bans if the user has the proper access. */
if(uData->access >= ulMaster)
--- 3399,3402 ----
***************
*** 3396,3400 ****
struct string_list *removed;
char *ban;
- (void)argc; (void)argv;
if(!channel->banlist.used)
--- 3415,3418 ----
***************
*** 3769,3773 ****
static int
! cmd_list_users(struct userNode *user, struct chanNode *channel, unsigned int argc, unsigned char *argv[], struct svccmd *cmd, enum userLevel display_lowest, enum userLevel display_highest)
{
void (*send_list)(char *, struct userNode *, struct chanNode *, struct listData *);
--- 3787,3791 ----
static int
! cmd_list_users(struct userNode *user, struct chanNode *channel, unsigned int argc, unsigned char *argv[], UNUSED_ARG(struct svccmd *cmd), enum userLevel display_lowest, enum userLevel display_highest)
{
void (*send_list)(char *, struct userNode *, struct chanNode *, struct listData *);
***************
*** 3779,3783 ****
char *search = NULL;
- (void)cmd;
if(argc > 1) search = argv[1];
send_list = zoot_list;
--- 3797,3800 ----
***************
*** 4028,4032 ****
{
char modes[MODELEN], *changes;
- (void)argc; (void)argv;
if(argc < 2)
--- 4045,4048 ----
***************
*** 4118,4122 ****
{
struct userData *uData;
! (void)argv;
if(GetUserMode(channel, user))
{
--- 4134,4138 ----
{
struct userData *uData;
!
if(GetUserMode(channel, user))
{
***************
*** 4138,4143 ****
static CHANSERV_FUNC(cmd_version)
{
- (void)channel;
-
chanserv_notice(user, MSG_VERSION);
--- 4154,4157 ----
***************
*** 4216,4220 ****
int privileged;
- (void)argv;
cData = channel->channel_info;
chanserv_notice(user, CSMSG_CHANNEL_INFO, channel->name);
--- 4230,4233 ----
***************
*** 4299,4311 ****
enum userLevel access;
int i;
- (void)argc;(void)argv;(void)channel;
chanserv_notice(user, CSMSG_NETWORK_INFO);
-
chanserv_notice(user, CSMSG_NETWORK_SERVERS, dict_size(servers));
chanserv_notice(user, CSMSG_NETWORK_USERS, dict_size(clients));
chanserv_notice(user, CSMSG_NETWORK_OPERS, curr_opers.used);
chanserv_notice(user, CSMSG_NETWORK_CHANNELS, registered_channels);
-
chanserv_notice(user, CSMSG_NETWORK_BANS, banCount);
for(access = USER_LEVEL_HIGHEST; access >= USER_LEVEL_LOWEST; access--)
--- 4312,4321 ----
***************
*** 4316,4323 ****
}
chanserv_notice(user, CSMSG_CHANNEL_USERS, "Total User", PADLEN - 17, "", userCount[0]);
-
intervalString(interval, time(NULL) - boot_time);
chanserv_notice(user, CSMSG_SERVICES_UPTIME, interval);
-
intervalString(interval, burst_length);
chanserv_notice(user, CSMSG_BURST_LENGTH, interval);
--- 4326,4331 ----
***************
*** 4359,4363 ****
static CHANSERV_FUNC(cmd_ircops)
{
- (void)argc;(void)argv;(void)channel;
chanserv_notice(user, CSMSG_STAFF_OPERS);
send_staff_list(user, &curr_opers, FLAGS_SERVICE);
--- 4367,4370 ----
***************
*** 4367,4371 ****
static CHANSERV_FUNC(cmd_helpers)
{
- (void)argc;(void)argv;(void)channel;
chanserv_notice(user, CSMSG_STAFF_HELPERS);
send_staff_list(user, &curr_helpers, FLAGS_OPER);
--- 4374,4377 ----
***************
*** 4375,4384 ****
static CHANSERV_FUNC(cmd_staff)
{
- (void)argc;(void)argv;(void)channel;
-
chanserv_notice(user, CSMSG_NETWORK_STAFF);
cmd_ircops(CSFUNC_ARGS);
cmd_helpers(CSFUNC_ARGS);
-
return 1;
}
--- 4381,4387 ----
***************
*** 4391,4395 ****
struct helpfile_table table;
- (void)argc;(void)argv;
irc_make_chanmode(channel, modes);
--- 4394,4397 ----
***************
*** 4544,4548 ****
char buf[400];
- (void)argv;
for (ii=pos=0; ii<channel->members.used; ++ii) {
targ = channel->members.list[ii]->user;
--- 4546,4549 ----
***************
*** 4773,4781 ****
{
int channel_count = registered_channels;
- (void)channel;(void)argc;(void)argv;
-
expire_channels(NULL);
chanserv_notice(user, CSMSG_CHANNELS_EXPIRED, channel_count - registered_channels);
-
return 1;
}
--- 4774,4779 ----
***************
*** 4891,4895 ****
global_message(MESSAGE_RECIPIENT_OPERS | MESSAGE_RECIPIENT_HELPERS, message);
return 1;
- (void)argv;
}
--- 4889,4892 ----
***************
*** 4915,4919 ****
search = malloc(sizeof(struct chanservSearch));
! (void)memset(search, 0, sizeof(*search));
search->limit = 25;
--- 4912,4916 ----
search = malloc(sizeof(struct chanservSearch));
! memset(search, 0, sizeof(*search));
search->limit = 25;
***************
*** 5020,5026 ****
static void
! search_count(struct chanData *channel, void *data)
{
- (void)channel;(void)data;
}
--- 5017,5022 ----
static void
! search_count(UNUSED_ARG(struct chanData *channel), UNUSED_ARG(void *data))
{
}
***************
*** 5038,5043 ****
channel_search_func action;
- (void)channel;
-
REQUIRE_PARAMS(3);
--- 5034,5037 ----
***************
*** 5090,5094 ****
char buffer[INTERVALLEN];
unsigned int limit = 25, matches = 0;
- (void)channel;
if(argc > 1)
--- 5084,5087 ----
***************
*** 5190,5197 ****
}
! int opt_greeting_common(struct userNode *user, struct chanNode *channel, int argc, unsigned char *argv[], char *name, char **data)
{
- (void)channel;
-
if(argc > 1)
{
--- 5183,5188 ----
}
! int opt_greeting_common(struct userNode *user, UNUSED_ARG(struct chanNode *channel), int argc, unsigned char *argv[], char *name, char **data)
{
if(argc > 1)
{
***************
*** 5282,5291 ****
static int
! channel_binary_option(char *name, unsigned long mask, struct userNode *user, struct chanNode *channel, int argc, unsigned char *argv[], struct svccmd *cmd)
{
struct chanData *cData = channel->channel_info;
int value;
- (void)cmd;
if(argc > 1)
{
--- 5273,5281 ----
static int
! channel_binary_option(char *name, unsigned long mask, struct userNode *user, struct chanNode *channel, int argc, unsigned char *argv[], UNUSED_ARG(struct svccmd *cmd))
{
struct chanData *cData = channel->channel_info;
int value;
if(argc > 1)
{
***************
*** 5318,5327 ****
static int
! channel_multiple_option(char *name, char *description, enum opt option, int check_level, struct valueData *values, int count, struct userNode *user, struct chanNode *channel, int argc, unsigned char *argv[], struct svccmd *cmd)
{
struct chanData *cData = channel->channel_info;
int index;
- (void)cmd;
if(argc > 1)
{
--- 5308,5316 ----
static int
! channel_multiple_option(char *name, char *description, enum opt option, int check_level, struct valueData *values, int count, struct userNode *user, struct chanNode *channel, int argc, unsigned char *argv[], UNUSED_ARG(struct svccmd *cmd))
{
struct chanData *cData = channel->channel_info;
int index;
if(argc > 1)
{
***************
*** 5634,5642 ****
static int
! user_binary_option(char *name, unsigned long mask, struct userNode *user, struct chanNode *channel, int argc, unsigned char *argv[], struct svccmd *cmd)
{
struct userData *uData;
int value;
- (void)cmd;
uData = GetChannelAccess(channel->channel_info, user->handle_info);
--- 5623,5630 ----
static int
! user_binary_option(char *name, unsigned long mask, struct userNode *user, struct chanNode *channel, int argc, unsigned char *argv[], UNUSED_ARG(struct svccmd *cmd))
{
struct userData *uData;
int value;
uData = GetChannelAccess(channel->channel_info, user->handle_info);
***************
*** 5900,5905 ****
static CHANSERV_FUNC(cmd_unf)
{
- (void)argc; (void)argv;
-
if(channel)
{
--- 5888,5891 ----
***************
*** 5917,5922 ****
static CHANSERV_FUNC(cmd_ping)
{
- (void)argc; (void)argv;
-
if(channel)
{
--- 5903,5906 ----
***************
*** 5934,5939 ****
static CHANSERV_FUNC(cmd_wut)
{
- (void)argc; (void)argv;
-
if(channel)
{
--- 5918,5921 ----
***************
*** 6002,6006 ****
static CHANSERV_FUNC(cmd_huggle)
{
- (void)argc; (void)argv;
if(channel)
{
--- 5984,5987 ----
***************
*** 6255,6262 ****
static void
! handle_auth(struct userNode *user, struct handle_info *old_handle)
{
struct chanList *channel;
- (void)old_handle;
if(!user->handle_info)
--- 6236,6242 ----
static void
! handle_auth(struct userNode *user, UNUSED_ARG(struct handle_info *old_handle))
{
struct chanList *channel;
if(!user->handle_info)
***************
*** 6310,6314 ****
static void
! handle_part(struct userNode *user, struct chanNode *channel, const char *reason)
{
struct chanData *cData;
--- 6290,6294 ----
static void
! handle_part(struct userNode *user, struct chanNode *channel, UNUSED_ARG(const char *reason))
{
struct chanData *cData;
***************
*** 6316,6320 ****
struct handle_info *handle;
- (void)reason;
cData = channel->channel_info;
if(!cData || IsSuspended(cData) || IsLocal(user)) return;
--- 6296,6299 ----
***************
*** 6386,6390 ****
static void
! handle_mode(struct chanNode *channel, struct userNode *user, int change_type, void *change)
{
if(!channel->channel_info || IsLocal(user) || IsSuspended(channel->channel_info) || IsService(user)) return;
--- 6365,6369 ----
static void
! handle_mode(struct chanNode *channel, struct userNode *user, int change_type, UNUSED_ARG(void *change))
{
if(!channel->channel_info || IsLocal(user) || IsSuspended(channel->channel_info) || IsService(user)) return;
***************
*** 6392,6397 ****
if(change_type == MODE_CHANGE_MISC)
{
- (void)change;
-
if(!check_user_level(user, channel, channel->channel_info->options[optEnfModes], 1, 0))
{
--- 6371,6374 ----
***************
*** 6463,6472 ****
static void
! handle_unreg(struct userNode *user, struct handle_info *handle)
{
struct chanList *channel, *next;
struct userNode *h_user;
- (void)user;
if(handle->channels)
{
--- 6440,6448 ----
static void
! handle_unreg(UNUSED_ARG(struct userNode *user), struct handle_info *handle)
{
struct chanList *channel, *next;
struct userNode *h_user;
if(handle->channels)
{
***************
*** 6487,6495 ****
static void
! handle_server_link(struct server *server)
{
struct chanData *cData;
- (void)server;
for(cData = channelList; cData; cData = cData->next)
{
--- 6463,6470 ----
static void
! handle_server_link(UNUSED_ARG(struct server *server))
{
struct chanData *cData;
for(cData = channelList; cData; cData = cData->next)
{
|