mirror of
https://github.com/jie65535/gc-opencommand-plugin.git
synced 2025-06-09 17:56:35 +08:00
添加多服务器状态下的多命令支持
This commit is contained in:
parent
896b802bff
commit
726b9ef62d
2
.gitignore
vendored
2
.gitignore
vendored
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
# Mobile Tools for Java (J2ME)
|
# Mobile Tools for Java (J2ME)
|
||||||
.mtj.tmp/
|
.mtj.tmp/
|
||||||
|
.vscode/
|
||||||
# Package Files #
|
# Package Files #
|
||||||
*.jar
|
*.jar
|
||||||
*.war
|
*.war
|
||||||
|
@ -130,8 +130,18 @@ public final class OpenCommandOnlyHttpHandler implements Router {
|
|||||||
public void timeout() {
|
public void timeout() {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
String[] parsedData = req.data.toString().split("\n[/!]|\\|");
|
||||||
SocketServer.sendPacketAndWait(server.ip, new RunConsoleCommand(req.data.toString()), wait);
|
if (parsedData.length > 1)
|
||||||
|
{
|
||||||
|
for (String parsed:parsedData)
|
||||||
|
{
|
||||||
|
SocketServer.sendPacketAndWait(server.ip, new RunConsoleCommand(parsed), wait);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SocketServer.sendPacketAndWait(server.ip, new RunConsoleCommand(req.data.toString()), wait);
|
||||||
|
}
|
||||||
var packet = wait.getData();
|
var packet = wait.getData();
|
||||||
if (packet == null) {
|
if (packet == null) {
|
||||||
context.json(new JsonResponse(408, "Timeout"));
|
context.json(new JsonResponse(408, "Timeout"));
|
||||||
|
Loading…
Reference in New Issue
Block a user