Пример #1
0
  @Override
  public void messageReceived(IrcMessage message) {
    if (message.getMessageType() == IrcMessageType.PrivateMessage
        && this.check(message.getMessage())) {
      IrcUser ircUser = IrcUser.tryParseFromIrcMessage(message.getFullMessage());

      if (ircUser != null && this.object.isAdminHost(ircUser.getHost())) {
        this.receiver = ircUser.getNick();

        this.execute();
      }
    }
  }
Пример #2
0
  @Override
  public void messageReceived(IrcMessage message) {
    if (message.getMessageType() == IrcMessageType.ChannelMessage
        && this.check(message.getMessage().trim())) {
      try {
        this.player = new Player(message.getNick(), message.getHost());

        this.execute();
      } catch (PlayerError e) {
        this.object.getExtensionMessenger().sendNotice(message.getNick(), e.getMessage());
      }
    }
  }
Пример #3
0
  @Override
  public void ircMessageReceived(String message) {
    if (message != null) {
      IrcMessage ircMessage = IrcMessage.tryParse(message);
      IrcEvent ircEvent = IrcEvent.tryParse(message);

      if (ircMessage != null) {
        this.taskManager.notifyMessageListeners(ircMessage);
      } else if (ircEvent != null) {
        this.taskManager.notifyEventListeners(ircEvent);
      } else {
        this.taskManager.notifyServerListeners(message);
      }
    }
  }