Пример #1
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());
      }
    }
  }
Пример #2
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();
      }
    }
  }