1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-09 03:03:12 +02:00

irc: use parsed command parameters in "account" command callback

This commit is contained in:
Sébastien Helleu
2021-10-10 21:38:41 +02:00
parent 5458382bb8
commit 69c457287d
2 changed files with 29 additions and 3 deletions
+25
View File
@@ -52,6 +52,7 @@
(void) host; \
(void) command; \
(void) ignored; \
(void) argc; \
(void) argv; \
(void) argv_eol; \
(void) params; \
@@ -67,6 +68,30 @@
return WEECHAT_RC_ERROR; \
}
#define IRC_PROTOCOL_MIN_PARAMS(__min_params) \
(void) date; \
(void) tags; \
(void) nick; \
(void) address; \
(void) host; \
(void) command; \
(void) ignored; \
(void) argc; \
(void) argv; \
(void) argv_eol; \
(void) params; \
(void) num_params; \
if (num_params < __min_params) \
{ \
weechat_printf (server->buffer, \
_("%s%s: too few parameters received in " \
"command \"%s\" (received: %d parameters, " \
"expected: at least %d)"), \
weechat_prefix ("error"), IRC_PLUGIN_NAME, \
command, num_params, __min_params); \
return WEECHAT_RC_ERROR; \
}
#define IRC_PROTOCOL_CHECK_HOST \
if (argv[0][0] != ':') \
{ \