public void removeNetworkUser(NetworkPlayer player) { int indexFromPlayer = NetworkUserList.getIndexFromPlayer(player); if (indexFromPlayer != -1) { if (Network.isServer) { Logger.LogConnection(NetworkUserList.users[indexFromPlayer].name + " Disconnected."); // Server alert disabled.. // NetworkChat.sendAlert(string.Concat(NetworkUserList.users[indexFromPlayer].name, " disconnected.")); } NetworkUserList.users.RemoveAt(indexFromPlayer); NetworkEvents.triggerOnPlayersChanged(); } }
public void addNetworkUser(string name, string nickname, string clan, string id, int status, int reputation, NetworkPlayer player) { NetworkUserList.users.Add(new NetworkUser(name, nickname, clan, id, status, reputation, player)); NetworkEvents.triggerOnPlayersChanged(); }