summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2005-02-14 22:42:23 +0000
committerSebastien Helleu <flashcode@flashtux.org>2005-02-14 22:42:23 +0000
commit235d96d728b584071a6b1223cc30175e2a783fb5 (patch)
tree42143b929ae80faa2e25d6fef82466de2f3d4321 /src/common
parent58417dddc6a9c9279fa2b4700e33093d6db7dc31 (diff)
downloadweechat-235d96d728b584071a6b1223cc30175e2a783fb5.zip
Fixed /help command (display bug)
Diffstat (limited to 'src/common')
-rw-r--r--src/common/command.c24
1 files changed, 16 insertions, 8 deletions
diff --git a/src/common/command.c b/src/common/command.c
index d38395bc3..5eec62a7a 100644
--- a/src/common/command.c
+++ b/src/common/command.c
@@ -1173,10 +1173,14 @@ weechat_cmd_help (int argc, char **argv)
gui_printf (NULL, _("Syntax: "));
gui_printf_color (NULL, COLOR_WIN_CHAT_CHANNEL, "/%s",
weechat_commands[i].command_name);
- gui_printf (NULL, " %s\n",
- (weechat_commands[i].arguments) ?
- _(weechat_commands[i].arguments) : "");
- if (weechat_commands[i].arguments_description)
+ if (weechat_commands[i].arguments &&
+ weechat_commands[i].arguments[0])
+ gui_printf (NULL, " %s\n",
+ _(weechat_commands[i].arguments));
+ else
+ gui_printf (NULL, "\n");
+ if (weechat_commands[i].arguments_description &&
+ weechat_commands[i].arguments_description[0])
gui_printf (NULL, "%s\n",
_(weechat_commands[i].arguments_description));
return 0;
@@ -1196,10 +1200,14 @@ weechat_cmd_help (int argc, char **argv)
gui_printf (NULL, _("Syntax: "));
gui_printf_color (NULL, COLOR_WIN_CHAT_CHANNEL, "/%s",
irc_commands[i].command_name);
- gui_printf (NULL, "%s\n",
- (irc_commands[i].arguments) ?
- _(irc_commands[i].arguments) : "");
- if (irc_commands[i].arguments_description)
+ if (irc_commands[i].arguments &&
+ irc_commands[i].arguments[0])
+ gui_printf (NULL, " %s\n",
+ _(irc_commands[i].arguments));
+ else
+ gui_printf (NULL, "\n");
+ if (irc_commands[i].arguments_description &&
+ irc_commands[i].arguments_description[0])
gui_printf (NULL, "%s\n",
_(irc_commands[i].arguments_description));
return 0;