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:
parent
21dc257c2c
commit
23282da4b5
1 changed files with 6 additions and 6 deletions
|
@ -81,12 +81,12 @@ static void stats_p_spy(struct Client *);
|
||||||
struct StatsStruct
|
struct StatsStruct
|
||||||
{
|
{
|
||||||
char letter;
|
char letter;
|
||||||
void (*handler) ();
|
void (*handler) (struct Client *source_p);
|
||||||
int need_oper;
|
int need_oper;
|
||||||
int need_admin;
|
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_delay(struct Client *);
|
||||||
static void stats_hash(struct Client *);
|
static void stats_hash(struct Client *);
|
||||||
static void stats_connect(struct Client *);
|
static void stats_connect(struct Client *);
|
||||||
|
@ -142,8 +142,8 @@ static struct StatsStruct stats_cmd_table[] = {
|
||||||
{'I', stats_auth, 0, 0, },
|
{'I', stats_auth, 0, 0, },
|
||||||
{'k', stats_tklines, 0, 0, },
|
{'k', stats_tklines, 0, 0, },
|
||||||
{'K', stats_klines, 0, 0, },
|
{'K', stats_klines, 0, 0, },
|
||||||
{'l', stats_ltrace, 0, 0, },
|
{'l', NULL /* special */, 0, 0, },
|
||||||
{'L', stats_ltrace, 0, 0, },
|
{'L', NULL /* special */, 0, 0, },
|
||||||
{'m', stats_messages, 0, 0, },
|
{'m', stats_messages, 0, 0, },
|
||||||
{'M', stats_messages, 0, 0, },
|
{'M', stats_messages, 0, 0, },
|
||||||
{'n', stats_dnsbl, 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'))
|
if((statchar != 'L') && (statchar != 'l'))
|
||||||
stats_spy(source_p, statchar, NULL);
|
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)
|
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.. */
|
/* Blah, stats L needs the parameters, none of the others do.. */
|
||||||
if(statchar == 'L' || statchar == 'l')
|
if(statchar == 'L' || statchar == 'l')
|
||||||
stats_cmd_table[i].handler (source_p, parc, parv);
|
stats_ltrace (source_p, parc, parv);
|
||||||
else
|
else
|
||||||
stats_cmd_table[i].handler (source_p);
|
stats_cmd_table[i].handler (source_p);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue