summaryrefslogtreecommitdiff
path: root/src/irc/irc-send.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/irc/irc-send.c')
-rw-r--r--src/irc/irc-send.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/irc/irc-send.c b/src/irc/irc-send.c
index b49b6efc9..46284a918 100644
--- a/src/irc/irc-send.c
+++ b/src/irc/irc-send.c
@@ -348,7 +348,18 @@ irc_cmd_send_away (t_irc_server *server, t_irc_channel *channel,
}
}
else
- irc_send_away (server, arguments);
+ {
+ if (server->is_connected)
+ irc_send_away (server, arguments);
+ else
+ {
+ irc_display_prefix (NULL, NULL, PREFIX_ERROR);
+ gui_printf_nolog (NULL,
+ _("%s command \"%s\" needs a server connection!\n"),
+ WEECHAT_ERROR, "away");
+ return -1;
+ }
+ }
gui_status_draw (buffer, 1);
gui_add_hotlist = 1;