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

Diff of /weechat/src/common/command.c

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

revision 1.48 by flashcode, Sun Feb 27 02:40:11 2005 UTC revision 1.49 by flashcode, Sat Mar 5 17:03:16 2005 UTC
# Line 65  t_weechat_command weechat_commands[] = Line 65  t_weechat_command weechat_commands[] =
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 },
# Line 1034  weechat_cmd_clear (int argc, char **argv Line 1038  weechat_cmd_clear (int argc, char **argv
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          {          {
# Line 1103  weechat_cmd_connect (int argc, char **ar Line 1107  weechat_cmd_connect (int argc, char **ar
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    
# Line 1316  weechat_cmd_perl (int argc, char **argv) Line 1352  weechat_cmd_perl (int argc, char **argv)
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);
# Line 1327  weechat_cmd_perl (int argc, char **argv) Line 1363  weechat_cmd_perl (int argc, char **argv)
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))

Legend:
Removed from v.1.48  
changed lines
  Added in v.1.49

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