summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/irc/irc-commands.c2
-rw-r--r--src/irc/irc-send.c10
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;
}