mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-22 12:05:51 -04:00
Allow configuring heartbeat URL
This commit is contained in:
parent
80cf6c2ced
commit
f8ecb00e4e
@ -25,14 +25,13 @@ namespace MCGalaxy.Network {
|
||||
|
||||
/// <summary> Heartbeat to ClassiCube.net's web server. </summary>
|
||||
public sealed class ClassiCubeBeat : Heartbeat {
|
||||
|
||||
string url = "http://www.classicube.net/heartbeat.jsp";
|
||||
string proxyUrl;
|
||||
public override string URL { get { return url; } }
|
||||
public override string URL { get { return ServerConfig.HeartbeatURL; } }
|
||||
|
||||
public override void Init() {
|
||||
try {
|
||||
IPAddress[] addresses = Dns.GetHostAddresses("www.classicube.net");
|
||||
string hostUrl = new Uri(URL).Host;
|
||||
IPAddress[] addresses = Dns.GetHostAddresses(hostUrl);
|
||||
EnsureIPv4Url(addresses);
|
||||
} catch (Exception ex) {
|
||||
Logger.Log(LogType.Warning, "Error while trying to retrieve DNS information for classicube.net");
|
||||
|
@ -27,7 +27,9 @@ namespace MCGalaxy {
|
||||
[ConfigString("server-name", "General", "[MCGalaxy] Default", false, asciiChars, 64)]
|
||||
public static string Name = "[MCGalaxy] Default";
|
||||
[ConfigString("motd", "General", "Welcome", false, asciiChars, 128)]
|
||||
public static string MOTD = "Welcome!";
|
||||
public static string MOTD = "Welcome!";
|
||||
[ConfigString("HeartbeatURL", "Other", "http://www.classicube.net/heartbeat.jsp", false, ":/.")]
|
||||
public static string HeartbeatURL = "http://www.classicube.net/heartbeat.jsp";
|
||||
[ConfigInt("max-players", "Server", 12, 1, 128)]
|
||||
public static int MaxPlayers = 12;
|
||||
[ConfigInt("max-guests", "Server", 10, 1, 128)]
|
||||
|
Loading…
x
Reference in New Issue
Block a user