diff options
Diffstat (limited to 'src/plugins/irc/irc-command.h')
-rw-r--r-- | src/plugins/irc/irc-command.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/plugins/irc/irc-command.h b/src/plugins/irc/irc-command.h index d86d22ba6..216136ebc 100644 --- a/src/plugins/irc/irc-command.h +++ b/src/plugins/irc/irc-command.h @@ -29,7 +29,9 @@ struct t_irc_channel; struct t_gui_buffer *buffer, \ int argc, char **argv, char **argv_eol) -#define IRC_COMMAND_CHECK_SERVER(__command, __check_connection) \ +#define IRC_COMMAND_CHECK_SERVER(__command, \ + __check_connection, \ + __check_socket) \ if (!ptr_server) \ { \ weechat_printf (NULL, \ @@ -39,7 +41,9 @@ struct t_irc_channel; __command); \ return WEECHAT_RC_OK; \ } \ - if (__check_connection && !ptr_server->is_connected) \ + if ((__check_connection && !ptr_server->is_connected) \ + || (__check_socket && !ptr_server->fake_server \ + && (ptr_server->sock < 0))) \ { \ weechat_printf (NULL, \ _("%s%s: command \"%s\" must be executed on " \ |