You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

42 lines
1.1 KiB

using Sog;
using ProtoCSStruct;
namespace Realmlist
{
/// <summary>
/// ip黑白名单列表
/// </summary>
public static class LimitIPList
{
public static void OpLimitIPList(uint serverID, StructPacket packet)
{
ref SSGetLimitReq req = ref packet.GetMessage<SSGetLimitReq>();
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();
}
}
}