From 4a4ea261b210895cedcc183ab9e07cf1fdcd20d1 Mon Sep 17 00:00:00 2001 From: Jilles Tjoelker Date: Wed, 11 Jun 2008 00:53:21 +0200 Subject: [PATCH] m_stats: get rid of function pointers with unspecified parameter lists stats l/L is now more a special case than before --- modules/m_stats.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/m_stats.c b/modules/m_stats.c index 45b9b38..c013c99 100644 --- a/modules/m_stats.c +++ b/modules/m_stats.c @@ -81,12 +81,12 @@ static void stats_p_spy(struct Client *); struct StatsStruct { char letter; - void (*handler) (); + void (*handler) (struct Client *source_p); int need_oper; int need_admin; }; -static void stats_dns_servers (struct Client *); +static void stats_dns_servers(struct Client *); static void stats_delay(struct Client *); static void stats_hash(struct Client *); static void stats_connect(struct Client *); @@ -142,8 +142,8 @@ static struct StatsStruct stats_cmd_table[] = { {'I', stats_auth, 0, 0, }, {'k', stats_tklines, 0, 0, }, {'K', stats_klines, 0, 0, }, - {'l', stats_ltrace, 0, 0, }, - {'L', stats_ltrace, 0, 0, }, + {'l', NULL /* special */, 0, 0, }, + {'L', NULL /* special */, 0, 0, }, {'m', stats_messages, 0, 0, }, {'M', stats_messages, 0, 0, }, {'n', stats_dnsbl, 0, 0, }, @@ -211,7 +211,7 @@ m_stats(struct Client *client_p, struct Client *source_p, int parc, const char * if((statchar != 'L') && (statchar != 'l')) stats_spy(source_p, statchar, NULL); - for (i = 0; stats_cmd_table[i].handler; i++) + for (i = 0; stats_cmd_table[i].letter; i++) { if(stats_cmd_table[i].letter == statchar) { @@ -234,7 +234,7 @@ m_stats(struct Client *client_p, struct Client *source_p, int parc, const char * /* Blah, stats L needs the parameters, none of the others do.. */ if(statchar == 'L' || statchar == 'l') - stats_cmd_table[i].handler (source_p, parc, parv); + stats_ltrace (source_p, parc, parv); else stats_cmd_table[i].handler (source_p); }