mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-22 12:05:51 -04:00
Minor tidyup of classicube heartbeat code.
This commit is contained in:
parent
15aaf619ca
commit
82ffc8dce5
@ -69,18 +69,10 @@ namespace MCGalaxy.Network {
|
||||
"&public=" + ServerConfig.Public +
|
||||
"&version=7" +
|
||||
"&salt=" + Server.salt +
|
||||
"&users=" + PlayerCount() +
|
||||
"&users=" + PlayerInfo.NonHiddenCount() +
|
||||
"&software=" + Uri.EscapeDataString(Server.SoftwareNameVersioned);
|
||||
}
|
||||
|
||||
static int PlayerCount() {
|
||||
int count = PlayerInfo.NonHiddenCount();
|
||||
// This may happen if a VIP joins an already full server.
|
||||
if (count > ServerConfig.MaxPlayers)
|
||||
count = ServerConfig.MaxPlayers;
|
||||
return count;
|
||||
}
|
||||
|
||||
public override void OnRequest(HttpWebRequest request) {
|
||||
if (proxyUrl == null) return;
|
||||
request.Proxy = new WebProxy(proxyUrl);
|
||||
|
@ -28,8 +28,7 @@ namespace MCGalaxy.Tasks {
|
||||
internal static class ServerTasks {
|
||||
|
||||
internal static void QueueTasks() {
|
||||
Server.MainScheduler.QueueRepeat(CheckState,
|
||||
null, TimeSpan.FromSeconds(3));
|
||||
Server.MainScheduler.QueueRepeat(CheckState, null, TimeSpan.FromSeconds(3));
|
||||
|
||||
Server.Background.QueueRepeat(AutoSave,
|
||||
1, TimeSpan.FromSeconds(ServerConfig.BackupInterval));
|
||||
|
Loading…
x
Reference in New Issue
Block a user