//153 - "SETFLATCAT": "BY" public void Listener153() { int roomId = ArgumentEncoding.decodeInt(mPacketBody); int catId = ArgumentEncoding.decodeInt(mPacketBody.Substring(ArgumentEncoding.getLength(roomId)) + 1); RoomInfo info = InstanceManager.Game.Rooms.GetRoom(roomId); RoomCategory cat = InstanceManager.Game.Rooms.GetCategory(catId); if (info != null && cat != null) { if (cat.PlayerCategory) { info.RoomCategory = catId; InstanceManager.Game.Rooms.UpdateRoom(info); } } }
private void DoBan() { string banReason = FuseMessage.getArgument(1, mPayload); string banExtra = FuseMessage.getArgument(2, mPayload); string banUser = FuseMessage.getArgument(3, mPayload); string banLast = mPayload.Substring(FuseMessage.getArgumentEnd(3, mPayload)); int banHours = ArgumentEncoding.decodeInt(banLast); bool banIp = ArgumentEncoding.decodeInt(banLast.Substring(ArgumentEncoding.getLength(banHours) + 1)) > 0; bool banMachine = ArgumentEncoding.decodeInt(banLast.Substring(ArgumentEncoding.getLength(banHours))) > 0; long targetSession = InstanceManager.Sessions.GetSessionFromUser(banUser); if (targetSession != -1) { UserInfo user = InstanceManager.Sessions.GetSession(targetSession).mUserInfo; InstanceManager.Game.Moderation.ModeratorBan(null, user.userId, mUserInfo.userId, banReason, banHours, targetSession, mSessionID, banMachine, banIp, banExtra); } }