private static void TakeAllRights(Session Session, ClientMessage Message) { RoomInstance Instance = RoomManager.GetInstanceByRoomId(Session.CurrentRoomId); if (Instance == null || !Instance.CheckUserRights(Session, true)) { return; } foreach (uint UserId in Instance.UsersWithRights) { if (Instance.TakeUserRights(UserId)) { Session.SendData(RoomRightsRemovedConfirmationComposer.Compose(Instance.RoomId, UserId)); } } }
private static void TakeRights(Session Session, ClientMessage Message) { RoomInstance Instance = RoomManager.GetInstanceByRoomId(Session.CurrentRoomId); if (Instance == null || !Instance.CheckUserRights(Session, true)) { return; } int Amount = Message.PopWiredInt32(); for (int i = 0; (i < Amount && i <= 100); i++) { uint UserId = Message.PopWiredUInt32(); if (UserId > 0 && Instance.TakeUserRights(UserId)) { Session.SendData(RoomRightsRemovedConfirmationComposer.Compose(Instance.RoomId, UserId)); } } }