diff options
-rw-r--r-- | src/plugins/irc/irc-command.c | 5 |
1 files changed, 3 insertions, 2 deletions
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 |