m_stats: get rid of function pointers with unspecified parameter lists

stats l/L is now more a special case than before
This commit is contained in:
Jilles Tjoelker 2008-06-11 00:53:21 +02:00
parent 4cb8529c19
commit 4a4ea261b2
1 changed files with 6 additions and 6 deletions

View File

@ -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);
}