* Refactor

* Break out common BasicDOSProtector code into separate class.
This commit is contained in:
teravus
2013-10-07 23:19:50 -05:00
parent f76cc6036e
commit 75fdd6054d
7 changed files with 218 additions and 415 deletions

View File

@@ -53,10 +53,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
{
AllowXForwardedFor = true,
ForgetTimeSpan = TimeSpan.FromMinutes(2),
MaxRequestsInTimeframe = 5,
MaxRequestsInTimeframe = 20,
ReportingName = "FRIENDSDOSPROTECTOR",
RequestTimeSpan = TimeSpan.FromSeconds(5),
ThrottledAction = ThrottleAction.DoThrottledMethod
ThrottledAction = BasicDOSProtector.ThrottleAction.DoThrottledMethod
})
{
m_FriendsModule = fmodule;

View File

@@ -173,7 +173,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
MaxRequestsInTimeframe = 4,
ReportingName = "MAPDOSPROTECTOR",
RequestTimeSpan = TimeSpan.FromSeconds(10),
ThrottledAction = ThrottleAction.DoThrottledMethod
ThrottledAction = BasicDOSProtector.ThrottleAction.DoThrottledMethod
}).Process);
MainServer.Instance.AddLLSDHandler(
"/MAP/MapItems/" + m_scene.RegionInfo.RegionHandle.ToString(), HandleRemoteMapItemRequest);
@@ -1094,7 +1094,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
{
Hashtable reply = new Hashtable();
int statuscode = 500;
reply["str_response_string"] = "I blocked you! HAHAHAHAHAHAHHAHAH";
reply["str_response_string"] = "";
reply["int_response_code"] = statuscode;
reply["content_type"] = "text/plain";
return reply;