public void onUserJoined(IrcUser user) { userList.add(user); nickUserMap.put(user.nick, user); user.addObserver(this); updateTopic(); }
public void setName(String networkName) { this.networkName = networkName; setChanged(); notifyObservers(); updateTopic(); }
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(); }
public void onUserQuit(String nick) { nickUserMap.remove(nick); for (IrcUser user : userList) { if (user.nick.equals(nick)) { for (Buffer buffer : buffers.getBufferList(true)) { if (user.channels.contains(buffer.getInfo().name)) { buffer.getUsers().removeUserByNick(nick); } } userList.remove(user); user.deleteObserver(this); return; } } updateTopic(); }
public void onUserParted(String nick, String bufferName) { for (IrcUser user : userList) { if (user.nick.equals(nick) && user.channels.contains(bufferName)) { user.channels.remove(bufferName); break; } } for (Buffer buffer : buffers.getBufferList(true)) { if (buffer.getInfo().name.equalsIgnoreCase(bufferName)) { buffer.getUsers().removeUserByNick(nick); if (nick.equalsIgnoreCase(getNick())) { buffer.setActive(false); } break; } } updateTopic(); }
public void setServer(String server) { this.server = server; updateTopic(); }
public void setLatency(int latency) { this.latency = latency; updateTopic(); }