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 wrong argument count for %s command '%s' " |
|
WEECHAT_NAME " command '%s' " |
|
530 |
"(expected: %d arg%s)\n"), |
"(expected: %d arg%s)\n"), |
531 |
WEECHAT_ERROR, |
WEECHAT_ERROR, WEECHAT_NAME, |
532 |
command + 1, |
command + 1, |
533 |
weechat_commands[i].max_arg, |
weechat_commands[i].max_arg, |
534 |
(weechat_commands[i].max_arg > |
(weechat_commands[i].max_arg > |
535 |
1) ? "s" : ""); |
1) ? "s" : ""); |
536 |
else |
else |
537 |
gui_printf (NULL, |
gui_printf (NULL, |
538 |
_("%s wrong argument count for " |
_("%s wrong argument count for %s command '%s' " |
|
WEECHAT_NAME " command '%s' " |
|
539 |
"(expected: between %d and %d arg%s)\n"), |
"(expected: between %d and %d arg%s)\n"), |
540 |
WEECHAT_ERROR, |
WEECHAT_ERROR, WEECHAT_NAME, |
541 |
command + 1, |
command + 1, |
542 |
weechat_commands[i].min_arg, |
weechat_commands[i].min_arg, |
543 |
weechat_commands[i].max_arg, |
weechat_commands[i].max_arg, |
554 |
(ptr_args); |
(ptr_args); |
555 |
if (return_code < 0) |
if (return_code < 0) |
556 |
gui_printf (NULL, |
gui_printf (NULL, |
557 |
_("%s " WEECHAT_NAME " command \"%s\" failed\n"), |
_("%s %s command \"%s\" failed\n"), |
558 |
WEECHAT_ERROR, command + 1); |
WEECHAT_ERROR, WEECHAT_NAME, command + 1); |
559 |
} |
} |
560 |
if (argv) |
if (argv) |
561 |
{ |
{ |
751 |
pos++; |
pos++; |
752 |
if (!pos[0]) |
if (!pos[0]) |
753 |
{ |
{ |
754 |
gui_printf (NULL, _("%s missing arguments for \"alias\" command\n"), |
gui_printf (NULL, _("%s missing arguments for \"%s\" command\n"), |
755 |
WEECHAT_ERROR); |
WEECHAT_ERROR, "alias"); |
756 |
return -1; |
return -1; |
757 |
} |
} |
758 |
index_command_new (arguments); |
index_command_new (arguments); |
763 |
} |
} |
764 |
else |
else |
765 |
{ |
{ |
766 |
gui_printf (NULL, _("%s missing arguments for \"alias\" command\n"), |
gui_printf (NULL, _("%s missing arguments for \"%s\" command\n"), |
767 |
WEECHAT_ERROR); |
WEECHAT_ERROR, "alias"); |
768 |
return -1; |
return -1; |
769 |
} |
} |
770 |
} |
} |
802 |
else |
else |
803 |
{ |
{ |
804 |
gui_printf (NULL, |
gui_printf (NULL, |
805 |
_("unknown parameter \"%s\" for /clear command\n"), |
_("unknown parameter \"%s\" for \"%s\" command\n"), |
806 |
argv[0]); |
argv[0], "clear"); |
807 |
return -1; |
return -1; |
808 |
} |
} |
809 |
} |
} |
905 |
if (argc == 0) |
if (argc == 0) |
906 |
{ |
{ |
907 |
gui_printf (NULL, |
gui_printf (NULL, |
908 |
_("> List of " WEECHAT_NAME " internal commands:\n")); |
_("> List of %s internal commands:\n"), WEECHAT_NAME); |
909 |
for (i = 0; weechat_commands[i].command_name; i++) |
for (i = 0; weechat_commands[i].command_name; i++) |
910 |
gui_printf (NULL, " %s - %s\n", |
gui_printf (NULL, " %s - %s\n", |
911 |
weechat_commands[i].command_name, |
weechat_commands[i].command_name, |
925 |
{ |
{ |
926 |
gui_printf |
gui_printf |
927 |
(NULL, |
(NULL, |
928 |
_("> Help on " WEECHAT_NAME " internal command '%s':\n"), |
_("> Help on %s internal command '%s':\n"), |
929 |
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"), |
932 |
weechat_commands[i].command_name, |
weechat_commands[i].command_name, |
1008 |
irc_display_prefix (NULL, PREFIX_INFO); |
irc_display_prefix (NULL, PREFIX_INFO); |
1009 |
gui_printf_color (NULL, |
gui_printf_color (NULL, |
1010 |
COLOR_WIN_CHAT, |
COLOR_WIN_CHAT, |
1011 |
" Autoconnect: %s\n", |
_(" Autoconnect: %s\n"), |
1012 |
(ptr_server->autoconnect) ? _("yes") : _("no")); |
(ptr_server->autoconnect) ? _("yes") : _("no")); |
1013 |
irc_display_prefix (NULL, PREFIX_INFO); |
irc_display_prefix (NULL, PREFIX_INFO); |
1014 |
gui_printf_color (NULL, |
gui_printf_color (NULL, |
1015 |
COLOR_WIN_CHAT, |
COLOR_WIN_CHAT, |
1016 |
" Hostname : %s\n", |
_(" Hostname : %s\n"), |
1017 |
ptr_server->address); |
ptr_server->address); |
1018 |
irc_display_prefix (NULL, PREFIX_INFO); |
irc_display_prefix (NULL, PREFIX_INFO); |
1019 |
gui_printf_color (NULL, |
gui_printf_color (NULL, |
1088 |
if (argc < 2) |
if (argc < 2) |
1089 |
{ |
{ |
1090 |
gui_printf (NULL, |
gui_printf (NULL, |
1091 |
_("%s missing servername for \"/server del\" command\n"), |
_("%s missing servername for \"%s\" command\n"), |
1092 |
WEECHAT_ERROR); |
WEECHAT_ERROR, "server del"); |
1093 |
return -1; |
return -1; |
1094 |
} |
} |
1095 |
if (argc > 2) |
if (argc > 2) |
1096 |
gui_printf (NULL, |
gui_printf (NULL, |
1097 |
_("%s too much arguments for \"/server del\" command, ignoring arguments\n"), |
_("%s too much arguments for \"%s\" command, ignoring arguments\n"), |
1098 |
WEECHAT_WARNING); |
WEECHAT_WARNING, "server del"); |
1099 |
|
|
1100 |
/* look for server by name */ |
/* look for server by name */ |
1101 |
server_found = NULL; |
server_found = NULL; |
1111 |
if (!server_found) |
if (!server_found) |
1112 |
{ |
{ |
1113 |
gui_printf (NULL, |
gui_printf (NULL, |
1114 |
_("%s server \"%s\" not found for \"/server del\" command\n"), |
_("%s server \"%s\" not found for \"%s\" command\n"), |
1115 |
WEECHAT_ERROR, argv[1]); |
WEECHAT_ERROR, argv[1], "server del"); |
1116 |
return -1; |
return -1; |
1117 |
} |
} |
1118 |
|
|
1134 |
if (argc < 3) |
if (argc < 3) |
1135 |
{ |
{ |
1136 |
gui_printf (NULL, |
gui_printf (NULL, |
1137 |
_("%s missing parameters for \"/server command\"\n"), |
_("%s missing parameters for \"%s\" command\n"), |
1138 |
WEECHAT_ERROR); |
WEECHAT_ERROR, "server"); |
1139 |
server_destroy (&server); |
server_destroy (&server); |
1140 |
return -1; |
return -1; |
1141 |
} |
} |
1167 |
if (i == (argc - 1)) |
if (i == (argc - 1)) |
1168 |
{ |
{ |
1169 |
gui_printf (NULL, |
gui_printf (NULL, |
1170 |
_("%s missing password for \"-pwd\" parameter\n"), |
_("%s missing password for \"%s\" parameter\n"), |
1171 |
WEECHAT_ERROR); |
WEECHAT_ERROR, "-pwd"); |
1172 |
server_destroy (&server); |
server_destroy (&server); |
1173 |
return -1; |
return -1; |
1174 |
} |
} |
1179 |
if (i >= (argc - 3)) |
if (i >= (argc - 3)) |
1180 |
{ |
{ |
1181 |
gui_printf (NULL, |
gui_printf (NULL, |
1182 |
_("%s missing nick(s) for \"-nicks\" parameter\n"), |
_("%s missing nick(s) for \"%s\" parameter\n"), |
1183 |
WEECHAT_ERROR); |
WEECHAT_ERROR, "-nicks"); |
1184 |
server_destroy (&server); |
server_destroy (&server); |
1185 |
return -1; |
return -1; |
1186 |
} |
} |
1193 |
if (i == (argc - 1)) |
if (i == (argc - 1)) |
1194 |
{ |
{ |
1195 |
gui_printf (NULL, |
gui_printf (NULL, |
1196 |
_("%s missing password for \"-username\" parameter\n"), |
_("%s missing password for \"%s\" parameter\n"), |
1197 |
WEECHAT_ERROR); |
WEECHAT_ERROR, "-username"); |
1198 |
server_destroy (&server); |
server_destroy (&server); |
1199 |
return -1; |
return -1; |
1200 |
} |
} |
1205 |
if (i == (argc - 1)) |
if (i == (argc - 1)) |
1206 |
{ |
{ |
1207 |
gui_printf (NULL, |
gui_printf (NULL, |
1208 |
_("%s missing password for \"-realname\" parameter\n"), |
_("%s missing password for \"%s\" parameter\n"), |
1209 |
WEECHAT_ERROR); |
WEECHAT_ERROR, "-realname"); |
1210 |
server_destroy (&server); |
server_destroy (&server); |
1211 |
return -1; |
return -1; |
1212 |
} |
} |
1217 |
if (i == (argc - 1)) |
if (i == (argc - 1)) |
1218 |
{ |
{ |
1219 |
gui_printf (NULL, |
gui_printf (NULL, |
1220 |
_("%s missing command for \"-command\" parameter\n"), |
_("%s missing command for \"%s\" parameter\n"), |
1221 |
WEECHAT_ERROR); |
WEECHAT_ERROR, "-command"); |
1222 |
server_destroy (&server); |
server_destroy (&server); |
1223 |
return -1; |
return -1; |
1224 |
} |
} |
1229 |
if (i == (argc - 1)) |
if (i == (argc - 1)) |
1230 |
{ |
{ |
1231 |
gui_printf (NULL, |
gui_printf (NULL, |
1232 |
_("%s missing password for \"-autojoin\" parameter\n"), |
_("%s missing password for \"%s\" parameter\n"), |
1233 |
WEECHAT_ERROR); |
WEECHAT_ERROR, "-autojoin"); |
1234 |
server_destroy (&server); |
server_destroy (&server); |
1235 |
return -1; |
return -1; |
1236 |
} |
} |
1354 |
} |
} |
1355 |
} |
} |
1356 |
} |
} |
1357 |
gui_printf (NULL, _("(TODO) \"/set\" command not developed!\n")); |
gui_printf (NULL, "(TODO) \"/set\" command not developed!\n"); |
1358 |
return 0; |
return 0; |
1359 |
} |
} |
1360 |
|
|