mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-03-21 17:50:29 -05:00
Support the ladder room in testclient.html
This commit is contained in:
parent
8b95302e97
commit
1414eaa994
|
|
@ -20,13 +20,12 @@ You can connect to an arbitrary server by navigating to
|
|||
`testclient.html?~~host:port`. For example, to connect to a server running
|
||||
locally on port 8000, you can navigate to `testclient.html?~~localhost:8000`.
|
||||
|
||||
Certain things will fail:
|
||||
The following things will fail in `testclient.html`:
|
||||
|
||||
+ Registering
|
||||
+ Changing name to a registered name other than the one you are currently
|
||||
logged in with (however, changing to an unregistered name will work, and
|
||||
you can even change back to your original registered name afterward)
|
||||
+ The ladder room (however, the `/ladder` command does work)
|
||||
|
||||
Everything else can be tested, though.
|
||||
|
||||
|
|
|
|||
|
|
@ -402,7 +402,10 @@
|
|||
};
|
||||
$.get = function(uri, callback, type) {
|
||||
if (type === 'html') {
|
||||
return showUnsupported();
|
||||
uri += '&testclient';
|
||||
}
|
||||
if (uri[0] === '/') { // relative URI
|
||||
uri = Tools.resourcePrefix + uri.substr(1);
|
||||
}
|
||||
self.addPopup(ProxyPopup, {uri: uri, callback: callback});
|
||||
};
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ include 'lib/ntbb-ladder.lib.php';
|
|||
|
||||
$serverid = 'showdown';
|
||||
$formatid = 'OU';
|
||||
$output = @$_REQUEST['output'];
|
||||
|
||||
if (@$_REQUEST['format']) $formatid = $_REQUEST['format'];
|
||||
if (@$_REQUEST['server']) $serverid = $_REQUEST['server'];
|
||||
|
|
@ -13,6 +12,10 @@ if (!ctype_alnum($formatid)) {
|
|||
die('denied');
|
||||
}
|
||||
|
||||
if (isset($_REQUEST['testclient'])) {
|
||||
header('Content-Type: text/plain; charset=utf-8');
|
||||
}
|
||||
|
||||
$ladder = new NTBBLadder($serverid, $formatid);
|
||||
?>
|
||||
<table>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user