kike: allow STATS with no parameters
We were in plain conflict with RFC 2812 for no apparent reason.
This commit is contained in:
parent
b9eddabedd
commit
2fccfb10f7
8
kike.c
8
kike.c
@ -2894,9 +2894,9 @@ irc_handle_stats_uptime (struct client *c)
|
|||||||
static void
|
static void
|
||||||
irc_handle_stats (const struct irc_message *msg, struct client *c)
|
irc_handle_stats (const struct irc_message *msg, struct client *c)
|
||||||
{
|
{
|
||||||
char query;
|
char query = 0;
|
||||||
if (msg->params.len < 1 || !(query = *msg->params.vector[0]))
|
if (msg->params.len > 0)
|
||||||
RETURN_WITH_REPLY (c, IRC_ERR_NEEDMOREPARAMS, msg->command);
|
query = *msg->params.vector[0];
|
||||||
if (msg->params.len > 1 && !irc_is_this_me (c->ctx, msg->params.vector[1]))
|
if (msg->params.len > 1 && !irc_is_this_me (c->ctx, msg->params.vector[1]))
|
||||||
RETURN_WITH_REPLY (c, IRC_ERR_NOSUCHSERVER, msg->params.vector[1]);
|
RETURN_WITH_REPLY (c, IRC_ERR_NOSUCHSERVER, msg->params.vector[1]);
|
||||||
if (!(c->mode & IRC_USER_MODE_OPERATOR))
|
if (!(c->mode & IRC_USER_MODE_OPERATOR))
|
||||||
@ -2909,7 +2909,7 @@ irc_handle_stats (const struct irc_message *msg, struct client *c)
|
|||||||
case 'u': irc_handle_stats_uptime (c); break;
|
case 'u': irc_handle_stats_uptime (c); break;
|
||||||
}
|
}
|
||||||
|
|
||||||
irc_send_reply (c, IRC_RPL_ENDOFSTATS, query);
|
irc_send_reply (c, IRC_RPL_ENDOFSTATS, query ? query : '*');
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
Reference in New Issue
Block a user