public void UserOffline(ServerUser user) { if (userDictionary.ContainsKey(user.userName)) { userDictionary.Remove(user.userName); user.MoveToUserGroup(null); } }
public bool UserOnline(ServerUser user) { if(!userDictionary.ContainsKey(user.userName)) { userDictionary.Add(user.userName, user); user.MoveToUserGroup(lobby); return true; } else { return false; } }