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]"), |
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] | " |
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, |
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, |
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, |
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, |
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 |
} |
} |
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) |
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"), |
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, |