summaryrefslogtreecommitdiff
path: root/src/plugins/irc/irc-protocol.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/irc/irc-protocol.h')
-rw-r--r--src/plugins/irc/irc-protocol.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/plugins/irc/irc-protocol.h b/src/plugins/irc/irc-protocol.h
index 95e0aca3a..c96e10bb8 100644
--- a/src/plugins/irc/irc-protocol.h
+++ b/src/plugins/irc/irc-protocol.h
@@ -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] != ':') \
{ \