Exemplo n.º 1
0
  public IRCMsgHandler(IRCBot bot) {

    this.bot = bot;

    botnick = bot.getConfigs().getBotnick();
    startchan = bot.getConfigs().getStartChan();

    this.inboundMsgQ = bot.getInboundMsgQ();
    this.outboundMsgQ = bot.getOutboundMsgQ();

    loadServerResponseCodesToIgnore();

    ircCommands = bot.getIrcCommands();

    this.setInterruptListeners(bot.getInterruptListeners());
    this.setEventListeners(bot.getEventListeners());
    this.botCommandListeners = bot.getBotCommandListeners();

    pipelines = new Pipelines();

    setThreadExecuting(true);

    if (bot.getConfigs().isHeadless()) {
      UserInputBox uib = new UserInputBox(outboundMsgQ);
      uib.stub();
    }
  }
Exemplo n.º 2
0
  public BaseListener(IRCBot ircbot) {

    this.ircbot = ircbot;
    this.botnick = ircbot.getConfigs().getBotnick();

    this.ircCommands = ircbot.getIrcCommands();

    this.interruptListeners = this.ircbot.getInterruptListeners();
    this.eventListeners = this.ircbot.getEventListeners();
    this.outboundMsgQ = this.ircbot.getOutboundMsgQ();
  }