kike: send RPL_ISUPPORT in response to VERSION
Most servers do it.
This commit is contained in:
parent
690e29c78e
commit
64725b24bd
26
kike.c
26
kike.c
@ -1159,6 +1159,16 @@ irc_is_this_me (struct server_context *ctx, const char *target)
|
||||
|| str_map_find (&ctx->users, target);
|
||||
}
|
||||
|
||||
static void
|
||||
irc_send_isupport (struct client *c)
|
||||
{
|
||||
// Only # channels, +e supported, +I supported, unlimited arguments to MODE
|
||||
irc_send_reply (c, IRC_RPL_ISUPPORT, "CHANTYPES=# EXCEPTS INVEX MODES"
|
||||
" TARGMAX=WHOIS:,LIST:,NAMES:,PRIVMSG:1,NOTICE:1,KICK:"
|
||||
" NICKLEN=" XSTRINGIFY (IRC_MAX_NICKNAME)
|
||||
" CHANNELLEN=" XSTRINGIFY (IRC_MAX_CHANNEL_NAME));
|
||||
}
|
||||
|
||||
static void
|
||||
irc_try_finish_registration (struct client *c)
|
||||
{
|
||||
@ -1177,12 +1187,7 @@ irc_try_finish_registration (struct client *c)
|
||||
irc_send_reply (c, IRC_RPL_MYINFO, ctx->server_name, PROGRAM_VERSION,
|
||||
IRC_SUPPORTED_USER_MODES, IRC_SUPPORTED_CHAN_MODES);
|
||||
|
||||
// Only # channels, +e supported, +I supported, unlimited arguments to MODE
|
||||
irc_send_reply (c, IRC_RPL_ISUPPORT, "CHANTYPES=# EXCEPTS INVEX MODES"
|
||||
" TARGMAX=WHOIS:,LIST:,NAMES:,PRIVMSG:1,NOTICE:1,KICK:"
|
||||
" NICKLEN=" XSTRINGIFY (IRC_MAX_NICKNAME)
|
||||
" CHANNELLEN=" XSTRINGIFY (IRC_MAX_CHANNEL_NAME));
|
||||
|
||||
irc_send_isupport (c);
|
||||
irc_send_lusers (c);
|
||||
irc_send_motd (c);
|
||||
|
||||
@ -1552,10 +1557,11 @@ static void
|
||||
irc_handle_version (const struct irc_message *msg, struct client *c)
|
||||
{
|
||||
if (msg->params.len > 0 && !irc_is_this_me (c->ctx, msg->params.vector[0]))
|
||||
irc_send_reply (c, IRC_ERR_NOSUCHSERVER, msg->params.vector[0]);
|
||||
else
|
||||
irc_send_reply (c, IRC_RPL_VERSION, PROGRAM_VERSION, g_debug_mode,
|
||||
c->ctx->server_name, PROGRAM_NAME " " PROGRAM_VERSION);
|
||||
RETURN_WITH_REPLY (c, IRC_ERR_NOSUCHSERVER, msg->params.vector[0]);
|
||||
|
||||
irc_send_reply (c, IRC_RPL_VERSION, PROGRAM_VERSION, g_debug_mode,
|
||||
c->ctx->server_name, PROGRAM_NAME " " PROGRAM_VERSION);
|
||||
irc_send_isupport (c);
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user