19 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
20 |
*/ |
*/ |
21 |
|
|
|
|
|
22 |
/* command.c: WeeChat internal commands */ |
/* command.c: WeeChat internal commands */ |
23 |
|
|
24 |
|
|
25 |
|
#ifdef HAVE_CONFIG_H |
26 |
|
#include "config.h" |
27 |
|
#endif |
28 |
|
|
29 |
#include <stdlib.h> |
#include <stdlib.h> |
30 |
#include <string.h> |
#include <string.h> |
31 |
|
|
32 |
#include "weechat.h" |
#include "weechat.h" |
33 |
#include "command.h" |
#include "command.h" |
34 |
#include "config.h" |
#include "weeconfig.h" |
35 |
#include "../irc/irc.h" |
#include "../irc/irc.h" |
36 |
#include "../gui/gui.h" |
#include "../gui/gui.h" |
37 |
|
|
531 |
gui_printf (NULL, |
gui_printf (NULL, |
532 |
_("%s wrong argument count for %s command \"%s\" " |
_("%s wrong argument count for %s command \"%s\" " |
533 |
"(expected: %d arg%s)\n"), |
"(expected: %d arg%s)\n"), |
534 |
WEECHAT_ERROR, WEECHAT_NAME, |
WEECHAT_ERROR, PACKAGE_NAME, |
535 |
command + 1, |
command + 1, |
536 |
weechat_commands[i].max_arg, |
weechat_commands[i].max_arg, |
537 |
(weechat_commands[i].max_arg > |
(weechat_commands[i].max_arg > |
540 |
gui_printf (NULL, |
gui_printf (NULL, |
541 |
_("%s wrong argument count for %s command \"%s\" " |
_("%s wrong argument count for %s command \"%s\" " |
542 |
"(expected: between %d and %d arg%s)\n"), |
"(expected: between %d and %d arg%s)\n"), |
543 |
WEECHAT_ERROR, WEECHAT_NAME, |
WEECHAT_ERROR, PACKAGE_NAME, |
544 |
command + 1, |
command + 1, |
545 |
weechat_commands[i].min_arg, |
weechat_commands[i].min_arg, |
546 |
weechat_commands[i].max_arg, |
weechat_commands[i].max_arg, |
558 |
if (return_code < 0) |
if (return_code < 0) |
559 |
gui_printf (NULL, |
gui_printf (NULL, |
560 |
_("%s %s command \"%s\" failed\n"), |
_("%s %s command \"%s\" failed\n"), |
561 |
WEECHAT_ERROR, WEECHAT_NAME, command + 1); |
WEECHAT_ERROR, PACKAGE_NAME, command + 1); |
562 |
} |
} |
563 |
if (argv) |
if (argv) |
564 |
{ |
{ |
909 |
if (argc == 0) |
if (argc == 0) |
910 |
{ |
{ |
911 |
gui_printf (NULL, |
gui_printf (NULL, |
912 |
_("> List of %s internal commands:\n"), WEECHAT_NAME); |
_("> List of %s internal commands:\n"), PACKAGE_NAME); |
913 |
for (i = 0; weechat_commands[i].command_name; i++) |
for (i = 0; weechat_commands[i].command_name; i++) |
914 |
gui_printf (NULL, " %s - %s\n", |
gui_printf (NULL, " %s - %s\n", |
915 |
weechat_commands[i].command_name, |
weechat_commands[i].command_name, |
930 |
gui_printf |
gui_printf |
931 |
(NULL, |
(NULL, |
932 |
_("> Help on %s internal command \"%s\":\n"), |
_("> Help on %s internal command \"%s\":\n"), |
933 |
WEECHAT_NAME, weechat_commands[i].command_name); |
PACKAGE_NAME, weechat_commands[i].command_name); |
934 |
gui_printf (NULL, |
gui_printf (NULL, |
935 |
_("Syntax: /%s %s\n"), |
_("Syntax: /%s %s\n"), |
936 |
weechat_commands[i].command_name, |
weechat_commands[i].command_name, |