Exemple #1
0
 public void onDisable(String sender, String reason) {
   // while (1 != 0) {
   // boolean partlyParted = onPartAll(sender, reason);
   // if (partlyParted) {
   System.out.println("=============\tBot disabled by " + sender + "\t=============");
   this.disconnect();
   System.exit(0);
   //  }
   // }
 }
Exemple #2
0
  public Arisu() {
    try {
      config.load(new FileInputStream("config.properties"));
    } catch (IOException ex) {
      System.err.println("Error loading config.properties.\n" + ex);
      System.exit(0);
    }

    try {
      Startup.onStartup(admins, this, mods);
      this.setName(config.getProperty("nick", "Arisu"));
      this.setLogin(config.getProperty("realname", "Arisu"));
    } catch (Exception ex) {
      System.out.println("Startup failed.\n" + ex);
      System.exit(0);
    }

    cmds = new ArrayList<Commands>();

    cmds.add(new AdminsCommand());
    cmds.add(new ModsCommand());
    cmds.add(new BanCommand());
    cmds.add(new HelloCommand());
    // cmds.add(new BanCommand());
    cmds.add(new InviteCommand());
    cmds.add(new JoinCommand());
    cmds.add(new LeaveCommand());
    cmds.add(new ShutdownCommand());
    cmds.add(new SayCommand());
    cmds.add(new ActCommand());
    cmds.add(new OpCommand());
    cmds.add(new ShellCommand());
    cmds.add(new AuthCommand());
    cmds.add(new GitHubCommand());
    cmds.add(new IgnoreCommand());
    cmds.add(new UnIgnoreCommand());
    cmds.add(new YamlCommand());
  }