1637 |
{ |
{ |
1638 |
static time_t last_used = 0; |
static time_t last_used = 0; |
1639 |
|
|
|
/* Is the stats meant for us? */ |
|
|
if (!ConfigServerHide.disable_remote_commands) |
|
|
if (hunt_server(client_p, source_p, ":%s STATS %s :%s", 2, |
|
|
parc, parv) != HUNTED_ISME) |
|
|
return; |
|
|
|
|
1640 |
if (!MyClient(source_p) && IsCapable(source_p->from, CAP_TS6) && HasID(source_p)) |
if (!MyClient(source_p) && IsCapable(source_p->from, CAP_TS6) && HasID(source_p)) |
1641 |
{ |
{ |
1642 |
from = me.id; |
from = me.id; |
1658 |
|
|
1659 |
last_used = CurrentTime; |
last_used = CurrentTime; |
1660 |
|
|
1661 |
|
/* Is the stats meant for us? */ |
1662 |
|
if (!ConfigServerHide.disable_remote_commands) |
1663 |
|
if (hunt_server(client_p, source_p, ":%s STATS %s :%s", 2, |
1664 |
|
parc, parv) != HUNTED_ISME) |
1665 |
|
return; |
1666 |
|
|
1667 |
do_stats(source_p, parc, parv); |
do_stats(source_p, parc, parv); |
1668 |
} |
} |
1669 |
|
|
1698 |
do_stats(source_p, parc, parv); |
do_stats(source_p, parc, parv); |
1699 |
} |
} |
1700 |
|
|
|
/* |
|
|
* ms_stats - STATS message handler |
|
|
* parv[0] = sender prefix |
|
|
* parv[1] = statistics selector (defaults to Message frequency) |
|
|
* parv[2] = server name (current server defaulted, if omitted) |
|
|
*/ |
|
|
static void |
|
|
ms_stats(struct Client *client_p, struct Client *source_p, |
|
|
int parc, char *parv[]) |
|
|
{ |
|
|
if (hunt_server(client_p, source_p, ":%s STATS %s :%s", 2, |
|
|
parc, parv) != HUNTED_ISME) |
|
|
return; |
|
|
|
|
|
if (IsClient(source_p)) |
|
|
mo_stats(client_p, source_p, parc, parv); |
|
|
} |
|
|
|
|
1701 |
static struct Message stats_msgtab = { |
static struct Message stats_msgtab = { |
1702 |
"STATS", 0, 0, 2, MAXPARA, MFLG_SLOW, 0, |
"STATS", 0, 0, 2, MAXPARA, MFLG_SLOW, 0, |
1703 |
{ m_unregistered, m_stats, ms_stats, m_ignore, mo_stats, m_ignore } |
{ m_unregistered, m_stats, mo_stats, m_ignore, mo_stats, m_ignore } |
1704 |
}; |
}; |
1705 |
|
|
1706 |
static void |
static void |