/// <summary> /// Initializes a new instance of the <see cref="SimpleClientEntity"/> class. /// </summary> /// <param name="client">The client.</param> public SimpleClientEntity(ClientListEntry client) { this.ClientDatabaseId = client.ClientDatabaseId; this.ClientId = client.ClientId; this.Nickname = client.Nickname; this.ServerGroups = new List<uint>(client.ServerGroups); this.ChannelId = client.ChannelId; this.Connected = client.ClientLastConnected; }
private static int SortUser(ClientListEntry client1, ClientListEntry client2) { if (client1.ClientType != client2.ClientType) return client1.ClientType == 1 ? 1 : -1; if (client1.ClientTalkPower != client2.ClientTalkPower) return (int)client2.ClientTalkPower - (int)client1.ClientTalkPower; if (client1.IsClientTalker != client2.IsClientTalker) return client1.IsClientTalker.Value ? 1 : -1; if (client1.IsClientInputMuted != client2.IsClientInputMuted) return client1.IsClientInputMuted.Value ? 1 : -1; return string.Compare(client1.Nickname, client2.Nickname); }