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.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/plugins/irc/irc-protocol.h b/src/plugins/irc/irc-protocol.h
index c6ebba837..7d3fc0038 100644
--- a/src/plugins/irc/irc-protocol.h
+++ b/src/plugins/irc/irc-protocol.h
@@ -125,6 +125,17 @@
return WEECHAT_RC_ERROR; \
}
+#define IRC_PROTOCOL_CHECK_HOST \
+ if (!address) \
+ { \
+ weechat_printf (server->buffer, \
+ _("%s%s: \"%s\" command received without " \
+ "host"), \
+ weechat_prefix ("error"), IRC_PLUGIN_NAME, \
+ command); \
+ return WEECHAT_RC_ERROR; \
+ }
+
struct t_irc_server;
typedef int (t_irc_recv_func)(struct t_irc_server *server,