public void Leave() { if (_currentChatroom != null) { _currentChatroom.Unregister(this); _currentChatroom = null; } }
public void Enter(AbstractChatroom chatroom) { if (_currentChatroom != null) { Leave(); } chatroom.Register(this); _currentChatroom = chatroom; }