diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2007-06-07 13:26:54 +0000 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2007-06-07 13:26:54 +0000 |
commit | 36f0aab4d46948870d7893719c73f7258c4fd379 (patch) | |
tree | e8fb060c2d879dc57a375b0606deb43e723ef1b3 /src/irc | |
parent | 1f77a51ddc83ff878d5d4ac1801d29ada4277cc2 (diff) | |
download | weechat-36f0aab4d46948870d7893719c73f7258c4fd379.zip |
Fixed QUOTE command: now allowed when socket is ok (even if IRC connection to server is not ok) (bug #20113)
Diffstat (limited to 'src/irc')
-rw-r--r-- | src/irc/irc-commands.c | 2 | ||||
-rw-r--r-- | src/irc/irc-send.c | 10 |
2 files changed, 10 insertions, 2 deletions
diff --git a/src/irc/irc-commands.c b/src/irc/irc-commands.c index 3c6057ddb..97839cbc8 100644 --- a/src/irc/irc-commands.c +++ b/src/irc/irc-commands.c @@ -215,7 +215,7 @@ t_irc_command irc_commands[] = { "quote", N_("send raw data to server without parsing"), N_("data"), N_("data: raw data to send"), - "", 1, MAX_ARGS, 1, 1, NULL, irc_send_cmd_quote, NULL }, + "", 1, MAX_ARGS, 1, 0, NULL, irc_send_cmd_quote, NULL }, { "rehash", N_("tell the server to reload its config file"), "", "", NULL, 0, 0, 0, 1, NULL, irc_send_cmd_rehash, NULL }, { "restart", N_("tell the server to restart itself"), "", "", diff --git a/src/irc/irc-send.c b/src/irc/irc-send.c index a7ceb9d79..c2c4c0bd3 100644 --- a/src/irc/irc-send.c +++ b/src/irc/irc-send.c @@ -1759,7 +1759,15 @@ irc_send_cmd_quote (t_irc_server *server, t_irc_channel *channel, { /* make C compiler happy */ (void) channel; - + + if (!server || server->sock < 0) + { + irc_display_prefix (NULL, NULL, PREFIX_ERROR); + gui_printf_nolog (NULL, + _("%s command \"%s\" needs a server connection!\n"), + WEECHAT_ERROR, "quote"); + return -1; + } irc_server_sendf (server, "%s", arguments); return 0; } |