mirror of
https://github.com/2006-Scape/Parabot.git
synced 2026-07-03 00:37:55 +00:00
Add verbose prints for version & checksum info
This commit is contained in:
@@ -170,7 +170,9 @@ public class Core {
|
|||||||
String result;
|
String result;
|
||||||
if ((result = WebUtil.getContents(String.format(Configuration.COMPARE_CHECKSUM_URL, "client", currentVersion.get()), "checksum=" + URLEncoder.encode(sb.toString(), "UTF-8"))) != null) {
|
if ((result = WebUtil.getContents(String.format(Configuration.COMPARE_CHECKSUM_URL, "client", currentVersion.get()), "checksum=" + URLEncoder.encode(sb.toString(), "UTF-8"))) != null) {
|
||||||
JSONObject object = (JSONObject) WebUtil.getJsonParser().parse(result);
|
JSONObject object = (JSONObject) WebUtil.getJsonParser().parse(result);
|
||||||
return (boolean) object.get("result");
|
boolean upToDate = (boolean) object.get("result");
|
||||||
|
Core.verbose("Local checksum: " + URLEncoder.encode(sb.toString(), "UTF-8") + ". " + (upToDate ? "This matches BDN and is up to date." : "BDN mismatch, must be Out Of Date."));
|
||||||
|
return upToDate;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (NoSuchAlgorithmException | ParseException | IOException | URISyntaxException e) {
|
} catch (NoSuchAlgorithmException | ParseException | IOException | URISyntaxException e) {
|
||||||
@@ -196,6 +198,7 @@ public class Core {
|
|||||||
if (!latest) {
|
if (!latest) {
|
||||||
Directories.clearCache();
|
Directories.clearCache();
|
||||||
}
|
}
|
||||||
|
Core.verbose("Local version: " + currentVersion.get() + ". " + (latest ? "This is up to date." : "This is Out Of Date. Cache will be cleared."));
|
||||||
return latest;
|
return latest;
|
||||||
}
|
}
|
||||||
} catch (IOException | ParseException e) {
|
} catch (IOException | ParseException e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user