public void addUser(Player p) { ClanUser user = new ClanUser(p, this); if (p.getLoginDetails().getUsername().Equals(owner)) { user.setClanRights(ClanRank.OWNER); own = p; } if (ownerFriends.Contains(p.getLoginDetails().getLongName())) { if (user.getClanRights() == ClanRank.NO_RANK) { user.setClanRights(ClanRank.FRIEND); } } foreach (KeyValuePair <string, ClanRank> u in usersWithRank) { if (u.Key.Equals(p.getLoginDetails().getUsername())) { user.setClanRights(u.Value); break; } } p.setClan(this); lock (users) { users.Add(user); } }
public void addUser(Player p) { ClanUser user = new ClanUser(p, this); if (p.getLoginDetails().getUsername().Equals(owner)) { user.setClanRights(ClanRank.OWNER); own = p; } if (ownerFriends.Contains(p.getLoginDetails().getLongName())) { if (user.getClanRights() == ClanRank.NO_RANK) { user.setClanRights(ClanRank.FRIEND); } } foreach (KeyValuePair<string, ClanRank> u in usersWithRank) { if (u.Key.Equals(p.getLoginDetails().getUsername())) { user.setClanRights(u.Value); break; } } p.setClan(this); lock (users) { users.Add(user); } }
public void kickUser(long name) { ClanUser user = getUserByName(Misc.longToPlayerName(name)); if (user != null) { removeUser(user.getClanMember()); user.getClanMember().getPackets().resetClanInterface(); Server.getClanManager().updateClan(this); user.getClanMember().getPackets().sendMessage("You have been kicked from the clan channel."); } }