示例#1
0
  public void onUserJoined(IrcUser user) {
    userList.add(user);
    nickUserMap.put(user.nick, user);
    user.addObserver(this);

    updateTopic();
  }
示例#2
0
  public void setUserList(List<IrcUser> userList) {
    if (userList != null && userList.size() > 0) {
      for (IrcUser user : userList) {
        user.deleteObserver(this);
      }
    }
    this.userList = userList;
    nickUserMap.clear();
    for (IrcUser user : userList) {
      nickUserMap.put(user.nick, user);
      user.addObserver(this);
    }

    updateTopic();
  }