65 |
N_("[servername]"), |
N_("[servername]"), |
66 |
N_("servername: server name to disconnect"), |
N_("servername: server name to disconnect"), |
67 |
0, 1, weechat_cmd_disconnect, NULL }, |
0, 1, weechat_cmd_disconnect, NULL }, |
68 |
|
{ "debug", N_("print debug messages"), |
69 |
|
N_("dump"), |
70 |
|
N_("dump: save memory dump in WeeChat log file (same dump is written when WeeChat crashes)"), |
71 |
|
1, 1, weechat_cmd_debug, NULL }, |
72 |
{ "help", N_("display help about commands"), |
{ "help", N_("display help about commands"), |
73 |
N_("[command]"), N_("command: name of a WeeChat or IRC command"), |
N_("[command]"), N_("command: name of a WeeChat or IRC command"), |
74 |
0, 1, weechat_cmd_help, NULL }, |
0, 1, weechat_cmd_help, NULL }, |
1038 |
{ |
{ |
1039 |
if (argc == 1) |
if (argc == 1) |
1040 |
{ |
{ |
1041 |
if (strcmp (argv[0], "-all") == 0) |
if (strcasecmp (argv[0], "-all") == 0) |
1042 |
gui_buffer_clear_all (); |
gui_buffer_clear_all (); |
1043 |
else |
else |
1044 |
{ |
{ |
1107 |
} |
} |
1108 |
|
|
1109 |
/* |
/* |
1110 |
|
* weechat_cmd_debug: print debug messages |
1111 |
|
*/ |
1112 |
|
|
1113 |
|
int |
1114 |
|
weechat_cmd_debug (int argc, char **argv) |
1115 |
|
{ |
1116 |
|
if (argc != 1) |
1117 |
|
{ |
1118 |
|
irc_display_prefix (NULL, PREFIX_ERROR); |
1119 |
|
gui_printf (NULL, |
1120 |
|
_("%s wrong argument count for \"%s\" command\n"), |
1121 |
|
WEECHAT_ERROR, "debug"); |
1122 |
|
return -1; |
1123 |
|
} |
1124 |
|
|
1125 |
|
if (strcasecmp (argv[0], "dump") == 0) |
1126 |
|
{ |
1127 |
|
wee_dump (0); |
1128 |
|
} |
1129 |
|
else |
1130 |
|
{ |
1131 |
|
irc_display_prefix (NULL, PREFIX_ERROR); |
1132 |
|
gui_printf (NULL, |
1133 |
|
_("%s unknown option for \"%s\" command\n"), |
1134 |
|
WEECHAT_ERROR, "perl"); |
1135 |
|
return -1; |
1136 |
|
} |
1137 |
|
|
1138 |
|
return 0; |
1139 |
|
} |
1140 |
|
|
1141 |
|
/* |
1142 |
* weechat_cmd_disconnect: disconnect from a server |
* weechat_cmd_disconnect: disconnect from a server |
1143 |
*/ |
*/ |
1144 |
|
|
1352 |
|
|
1353 |
break; |
break; |
1354 |
case 1: |
case 1: |
1355 |
if (strcmp (argv[0], "autoload") == 0) |
if (strcasecmp (argv[0], "autoload") == 0) |
1356 |
plugin_auto_load (PLUGIN_TYPE_PERL, "perl/autoload"); |
plugin_auto_load (PLUGIN_TYPE_PERL, "perl/autoload"); |
1357 |
if (strcmp (argv[0], "unload") == 0) |
if (strcasecmp (argv[0], "unload") == 0) |
1358 |
{ |
{ |
1359 |
/* unload all Perl scripts */ |
/* unload all Perl scripts */ |
1360 |
plugin_unload (PLUGIN_TYPE_PERL, NULL); |
plugin_unload (PLUGIN_TYPE_PERL, NULL); |
1363 |
} |
} |
1364 |
break; |
break; |
1365 |
case 2: |
case 2: |
1366 |
if (strcmp (argv[0], "load") == 0) |
if (strcasecmp (argv[0], "load") == 0) |
1367 |
{ |
{ |
1368 |
/* load Perl script */ |
/* load Perl script */ |
1369 |
if (strstr(argv[1], DIR_SEPARATOR)) |
if (strstr(argv[1], DIR_SEPARATOR)) |