mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-27 01:05:38 +00:00
Moved to more specific User-Agent in the service Checker
This commit is contained in:
parent
cd16c7fb10
commit
6d9e9406ec
@ -1,5 +1,5 @@
|
||||
#Mon, 08 Jul 2013 20:48:59 -0400
|
||||
#Wed, 10 Jul 2013 23:30:57 +0200
|
||||
|
||||
program.VERSION=2.21
|
||||
program.BUILDNUM=292
|
||||
program.BUILDDATE=07/08/2013 08\:48 PM
|
||||
program.BUILDNUM=294
|
||||
program.BUILDDATE=07/10/2013 11\:30 PM
|
||||
|
@ -1,3 +1,3 @@
|
||||
#Build Number for ANT. Do not edit!
|
||||
#Mon Jul 08 20:48:59 EDT 2013
|
||||
build.number=293
|
||||
#Wed Jul 10 23:30:57 CEST 2013
|
||||
build.number=295
|
||||
|
@ -77,7 +77,7 @@ public class TFM_ServiceChecker
|
||||
// Well, lets bypass that! >:D
|
||||
HttpURLConnection connection = (HttpURLConnection) new URL(check_url).openConnection();
|
||||
connection.setRequestMethod("GET");
|
||||
connection.setRequestProperty("User-Agent", "Mozilla/5.0");
|
||||
connection.setRequestProperty("User-Agent", "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.2 Safari/537.36");
|
||||
connection.setRequestProperty("Host", "xpaw.ru");
|
||||
connection.setRequestProperty("Accept", "*/*");
|
||||
connection.setUseCaches(false);
|
||||
@ -108,7 +108,6 @@ public class TFM_ServiceChecker
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
TFM_Log.severe(ex);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -107,7 +107,7 @@ public class TotalFreedomMod extends JavaPlugin
|
||||
server.getScheduler().scheduleSyncRepeatingTask(this, new TFM_Heartbeat(this), HEARTBEAT_RATE * 20L, HEARTBEAT_RATE * 20L);
|
||||
|
||||
// Service uptime checker
|
||||
server.getScheduler().scheduleSyncRepeatingTask(this, TFM_ServiceChecker.checker, SERVICE_CHECKER_RATE * 20L, 5 * 20L);
|
||||
server.getScheduler().scheduleSyncRepeatingTask(this, TFM_ServiceChecker.checker, SERVICE_CHECKER_RATE * 20L, 1 * 20L);
|
||||
|
||||
TFM_CommandLoader.getInstance().scan();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user