예제 #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();
    }
  }
예제 #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();
  }
예제 #3
0
 public IRCMsg createAndDecorateMsg(String rawMsg) {
   IRCMsg msg = IRCMsgFactory.createIRCMsg(rawMsg);
   return IRCMessageDecorator.decorateMessage(bot.getConfigs(), msg);
 }