public void ServerGetUnreadMessages(string adminId, int currentCount, NetworkConnection requestee)
		{
			if (!PlayerList.Instance.IsAdmin(adminId)) return;

			if (currentCount >= serverAdminChatLogs.Count)
			{
				return;
			}

			AdminChatUpdate update = new AdminChatUpdate
			{
				messages = serverAdminChatLogs
			};
			AdminChatUpdateMessage.SendLogUpdateToAdmin(requestee, update);
		}
Exemple #2
0
        public void ServerGetUnreadMessages(string playerId, int currentCount, NetworkConnection requestee)
        {
            if (!serverAdminPlayerChatLogs.ContainsKey(playerId))
            {
                serverAdminPlayerChatLogs.Add(playerId, new List <AdminChatMessage>());
            }

            if (currentCount >= serverAdminPlayerChatLogs[playerId].Count)
            {
                return;
            }

            AdminChatUpdate update = new AdminChatUpdate();

            update.messages = serverAdminPlayerChatLogs[playerId].GetRange(currentCount,
                                                                           serverAdminPlayerChatLogs[playerId].Count - currentCount);

            AdminPlayerChatUpdateMessage.SendLogUpdateToAdmin(requestee, update, playerId);
        }
        public void ServerGetUnreadMessages(string adminId, int currentCount, NetworkConnection requestee)
        {
            if (!PlayerList.Instance.IsAdmin(adminId))
            {
                return;
            }

            if (currentCount >= serverAdminChatLogs.Count)
            {
                return;
            }

            foreach (var adminChatChunk in serverAdminChatLogs.ToList().Chunk(100))
            {
                AdminChatUpdate update = new AdminChatUpdate
                {
                    messages = adminChatChunk.ToList()
                };
                AdminChatUpdateMessage.SendLogUpdateToAdmin(requestee, update);
            }
        }