mirror of
https://github.com/2006-Scape/Parabot.git
synced 2026-07-07 08:39:12 +00:00
Updated to V2.04
Including database server providers - loading
This commit is contained in:
@@ -9,8 +9,9 @@ public class Configuration {
|
||||
public static final String LOGIN_SERVER = "http://www.parabot.org/community/api/login.php?username=%s&password=%s";
|
||||
public static final String SDN_SCRIPTS = "http://sdn.parabot.org/scripts.php?user=%s";
|
||||
public static final String GET_SDN_SCRIPT = "http://sdn.parabot.org/getscript.php?user=%s&pass=%s&scriptid=%d";
|
||||
public static final String GET_SERVER_PROVIDERS = "http://sdn.parabot.org/list/providers.php";
|
||||
public static final String GET_SERVER_PROVIDER = "http://sdn.parabot.org/providers/%s";
|
||||
public static final String GET_SERVER_PROVIDERS = "http://sdn.parabot.org/providers/index.php";
|
||||
public static final String GET_SERVER_PROVIDER = "http://sdn.parabot.org/providers/provider.php?id=";
|
||||
public static final String GET_SERVER_PROVIDER_INFO = "http://sdn.parabot.org/providers/getInformation.php?id=";
|
||||
public static final String GET_BOT_VERSION = "http://bot.parabot.org/version.txt";
|
||||
|
||||
public static final double BOT_VERSION = 2.04; // BETA
|
||||
|
||||
@@ -98,5 +98,4 @@ public class Core {
|
||||
Core.verbose("Updates available...");
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
package org.parabot.core.forum;
|
||||
|
||||
import java.net.URLEncoder;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import org.parabot.core.Configuration;
|
||||
import org.parabot.core.Core;
|
||||
import org.parabot.core.parsers.scripts.SDNScripts;
|
||||
@@ -10,6 +7,9 @@ import org.parabot.core.ui.LoginUI;
|
||||
import org.parabot.environment.api.utils.WebUtil;
|
||||
import org.parabot.environment.scripts.SDNScriptExecuter;
|
||||
|
||||
import java.net.URLEncoder;
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* Handles logging in to parabot forum, only certain classes may use this class.
|
||||
*
|
||||
@@ -60,9 +60,9 @@ public final class AccountManager {
|
||||
String contents = null;
|
||||
try {
|
||||
contents = WebUtil.getContents(String.format(
|
||||
Configuration.LOGIN_SERVER,
|
||||
URLEncoder.encode(user, "UTF-8"),
|
||||
URLEncoder.encode(pass, "UTF-8")));
|
||||
Configuration.LOGIN_SERVER,
|
||||
URLEncoder.encode(user, "UTF-8"),
|
||||
URLEncoder.encode(pass, "UTF-8")));
|
||||
} catch (Throwable t) {
|
||||
t.printStackTrace();
|
||||
return false;
|
||||
@@ -71,7 +71,7 @@ public final class AccountManager {
|
||||
if (contents.equals("correct")) {
|
||||
account = new Account(user, pass);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ public class PublicServers extends ServerParser {
|
||||
version = Double.parseDouble(line);
|
||||
break;
|
||||
case 0:
|
||||
// jarName
|
||||
// serverID
|
||||
ServerDescription desc = new ServerDescription(name,
|
||||
author, version);
|
||||
SERVER_CACHE.put(desc, new PublicServerExecuter(name, line));
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package org.parabot.core.ui;
|
||||
|
||||
import org.parabot.core.Configuration;
|
||||
import org.parabot.core.ui.components.BotToolbar;
|
||||
import org.parabot.core.ui.components.GamePanel;
|
||||
import org.parabot.core.ui.components.LogArea;
|
||||
@@ -84,7 +85,7 @@ public class BotUI extends JFrame implements ActionListener {
|
||||
|
||||
SwingUtil.finalize(this);
|
||||
|
||||
LogArea.log("parabot v2.03 started");
|
||||
LogArea.log("parabot " + Configuration.BOT_VERSION +" started");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user