using Sog; using ProtoCSStruct; namespace Realmlist { /// /// ip黑白名单列表 /// public static class LimitIPList { public static void OpLimitIPList(uint serverID, StructPacket packet) { ref SSGetLimitReq req = ref packet.GetMessage(); SSGetLimitRes res = new SSGetLimitRes(); res.Id = req.Id; int opType = req.Op_type; switch (opType) { case 0: //查询 break; } RealmlistServerUtils.GetPacketSender().SendToServerByID(serverID, (int)SSGameMsgID.OperationLimitRes, ref res, 0); } public static bool IsInWhiteList(string ip, string deviceId) { if(string.IsNullOrEmpty(ip) && string.IsNullOrEmpty(deviceId)) { return false; } return LimitIpDevice.CheckInWhiteIp(ip) || LimitIpDevice.CheckInWhiteDeviceId(deviceId); } public static void Clear() { LimitIpDevice.Clear(); } } }