/[weechat]/weechat/src/command.c
ViewVC logotype

Diff of /weechat/src/command.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.13 by flashcode, Sat Oct 4 14:35:12 2003 UTC revision 1.14 by flashcode, Sun Oct 5 17:28:36 2003 UTC
# Line 38  Line 38 
38  t_weechat_command weechat_commands[] =  t_weechat_command weechat_commands[] =
39  { { "alias", N_("create an alias for a command"),  { { "alias", N_("create an alias for a command"),
40      N_("[alias_name [command [arguments]]"),      N_("[alias_name [command [arguments]]"),
41      N_("alias_name: name of alias\ncommand: command name (" WEECHAT_NAME      N_("alias_name: name of alias\ncommand: command name (WeeChat "
42      " or IRC command, without first '/')\n" "arguments: arguments for command"),      "or IRC command, without first '/')\n" "arguments: arguments for command"),
43      0, MAX_ARGS, NULL, weechat_cmd_alias },      0, MAX_ARGS, NULL, weechat_cmd_alias },
44    { "clear", N_("clear window(s)"),    { "clear", N_("clear window(s)"),
45      N_("[-all]"),      N_("[-all]"),
# Line 54  t_weechat_command weechat_commands[] = Line 54  t_weechat_command weechat_commands[] =
54      N_("servername: server name to disconnect"),      N_("servername: server name to disconnect"),
55      1, 1, weechat_cmd_disconnect, NULL },      1, 1, weechat_cmd_disconnect, NULL },
56    { "help", N_("display help about commands"),    { "help", N_("display help about commands"),
57      N_("[command]"), N_("command: name of a " WEECHAT_NAME " or IRC command"),      N_("[command]"), N_("command: name of a WeeChat or IRC command"),
58      0, 1, weechat_cmd_help, NULL },      0, 1, weechat_cmd_help, NULL },
59    { "server", N_("list, add or remove servers"),    { "server", N_("list, add or remove servers"),
60      N_("[list] | "      N_("[list] | "
# Line 526  exec_weechat_command (t_irc_server *serv Line 526  exec_weechat_command (t_irc_server *serv
526                  if (weechat_commands[i].min_arg ==                  if (weechat_commands[i].min_arg ==
527                      weechat_commands[i].max_arg)                      weechat_commands[i].max_arg)
528                      gui_printf (NULL,                      gui_printf (NULL,
529                                  _("%s wrong argument count for %s command '%s' "                                  _("%s wrong argument count for %s command \"%s\" "
530                                  "(expected: %d arg%s)\n"),                                  "(expected: %d arg%s)\n"),
531                                  WEECHAT_ERROR, WEECHAT_NAME,                                  WEECHAT_ERROR, WEECHAT_NAME,
532                                  command + 1,                                  command + 1,
# Line 535  exec_weechat_command (t_irc_server *serv Line 535  exec_weechat_command (t_irc_server *serv
535                                   1) ? "s" : "");                                   1) ? "s" : "");
536                  else                  else
537                      gui_printf (NULL,                      gui_printf (NULL,
538                                  _("%s wrong argument count for %s command '%s' "                                  _("%s wrong argument count for %s command \"%s\" "
539                                  "(expected: between %d and %d arg%s)\n"),                                  "(expected: between %d and %d arg%s)\n"),
540                                  WEECHAT_ERROR, WEECHAT_NAME,                                  WEECHAT_ERROR, WEECHAT_NAME,
541                                  command + 1,                                  command + 1,
# Line 578  exec_weechat_command (t_irc_server *serv Line 578  exec_weechat_command (t_irc_server *serv
578                  if (irc_commands[i].min_arg == irc_commands[i].max_arg)                  if (irc_commands[i].min_arg == irc_commands[i].max_arg)
579                      gui_printf                      gui_printf
580                          (NULL,                          (NULL,
581                           _("%s wrong argument count for IRC command '%s' "                           _("%s wrong argument count for IRC command \"%s\" "
582                           "(expected: %d arg%s)\n"),                           "(expected: %d arg%s)\n"),
583                           WEECHAT_ERROR,                           WEECHAT_ERROR,
584                           command + 1,                           command + 1,
# Line 587  exec_weechat_command (t_irc_server *serv Line 587  exec_weechat_command (t_irc_server *serv
587                  else                  else
588                      gui_printf                      gui_printf
589                          (NULL,                          (NULL,
590                           _("%s wrong argument count for IRC command '%s' "                           _("%s wrong argument count for IRC command \"%s\" "
591                           "(expected: between %d and %d arg%s)\n"),                           "(expected: between %d and %d arg%s)\n"),
592                           WEECHAT_ERROR,                           WEECHAT_ERROR,
593                           command + 1,                           command + 1,
# Line 600  exec_weechat_command (t_irc_server *serv Line 600  exec_weechat_command (t_irc_server *serv
600                      ((!server) || (!server->is_connected)))                      ((!server) || (!server->is_connected)))
601                  {                  {
602                      gui_printf (NULL,                      gui_printf (NULL,
603                                  _("%s command '%s' needs a server connection!\n"),                                  _("%s command \"%s\" needs a server connection!\n"),
604                                  WEECHAT_ERROR, irc_commands[i].command_name);                                  WEECHAT_ERROR, irc_commands[i].command_name);
605                      return 0;                      return 0;
606                  }                  }
# Line 653  exec_weechat_command (t_irc_server *serv Line 653  exec_weechat_command (t_irc_server *serv
653          }          }
654      }      }
655      gui_printf (NULL,      gui_printf (NULL,
656                  _("%s unknown command '%s' (type /help for help)\n"),                  _("%s unknown command \"%s\" (type /help for help)\n"),
657                  WEECHAT_ERROR,                  WEECHAT_ERROR,
658                  command + 1);                  command + 1);
659      if (argv)      if (argv)
# Line 925  weechat_cmd_help (int argc, char **argv) Line 925  weechat_cmd_help (int argc, char **argv)
925              {              {
926                  gui_printf                  gui_printf
927                      (NULL,                      (NULL,
928                       _("> Help on %s internal command '%s':\n"),                       _("> Help on %s internal command \"%s\":\n"),
929                       WEECHAT_NAME, weechat_commands[i].command_name);                       WEECHAT_NAME, weechat_commands[i].command_name);
930                  gui_printf (NULL,                  gui_printf (NULL,
931                              _("Syntax: /%s %s\n"),                              _("Syntax: /%s %s\n"),
# Line 947  weechat_cmd_help (int argc, char **argv) Line 947  weechat_cmd_help (int argc, char **argv)
947              if (strcasecmp (irc_commands[i].command_name, argv[0]) == 0)              if (strcasecmp (irc_commands[i].command_name, argv[0]) == 0)
948              {              {
949                  gui_printf (NULL,                  gui_printf (NULL,
950                              _("> Help on IRC command '%s':\n"),                              _("> Help on IRC command \"%s\":\n"),
951                              irc_commands[i].command_name);                              irc_commands[i].command_name);
952                  gui_printf (NULL, _("Syntax: /%s %s\n"),                  gui_printf (NULL, _("Syntax: /%s %s\n"),
953                              irc_commands[i].command_name,                              irc_commands[i].command_name,

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26