From 2f68ec7f3655efc9f814b2f4298d27029d1c6824 Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Tue, 28 Oct 2008 09:51:38 +0100 Subject: Fix IRC command /away -all --- src/plugins/irc/irc-command.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/plugins/irc') diff --git a/src/plugins/irc/irc-command.c b/src/plugins/irc/irc-command.c index dca897af9..1c3082ae1 100644 --- a/src/plugins/irc/irc-command.c +++ b/src/plugins/irc/irc-command.c @@ -389,13 +389,14 @@ irc_command_away (void *data, struct t_gui_buffer *buffer, int argc, weechat_buffer_set (NULL, "hotlist", "-"); - if ((argc > 2) && (weechat_strcasecmp (argv[1], "-all") == 0)) + if ((argc >= 2) && (weechat_strcasecmp (argv[1], "-all") == 0)) { for (ptr_server = irc_servers; ptr_server; ptr_server = ptr_server->next_server) { if (ptr_server->is_connected) - irc_command_away_server (ptr_server, argv_eol[2]); + irc_command_away_server (ptr_server, + (argc > 2) ? argv_eol[2] : NULL); } } else -- cgit v1.2.3