mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-11-15 11:39:11 +03:00
Merge branch 'dev' of github.com:GravitLauncher/Launcher into dev
This commit is contained in:
commit
3923251fd2
1 changed files with 3 additions and 3 deletions
|
@ -28,14 +28,14 @@ public void execute(ChannelHandlerContext ctx, Client client) {
|
||||||
for (ClientProfile p : server.getProfiles()) {
|
for (ClientProfile p : server.getProfiles()) {
|
||||||
if (!client.profile.getTitle().equals(p.getTitle())) continue;
|
if (!client.profile.getTitle().equals(p.getTitle())) continue;
|
||||||
if (!p.isWhitelistContains(client.username)) {
|
if (!p.isWhitelistContains(client.username)) {
|
||||||
service.sendObject(ctx, new ErrorRequestEvent("You don't download this folder"));
|
sendError("You don't download this folder");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
HashedDir dir = server.updatesDirMap.get(dirName);
|
HashedDir dir = server.updatesDirMap.get(dirName);
|
||||||
if (dir == null) {
|
if (dir == null) {
|
||||||
service.sendObject(ctx, new ErrorRequestEvent(String.format("Directory %s not found", dirName)));
|
sendError(String.format("Directory %s not found", dirName));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
String url = server.config.netty.downloadURL.replace("%dirname%", IOHelper.urlEncode(dirName));
|
String url = server.config.netty.downloadURL.replace("%dirname%", IOHelper.urlEncode(dirName));
|
||||||
|
@ -45,6 +45,6 @@ public void execute(ChannelHandlerContext ctx, Client client) {
|
||||||
url = bind.url;
|
url = bind.url;
|
||||||
zip = bind.zip;
|
zip = bind.zip;
|
||||||
}
|
}
|
||||||
service.sendObject(ctx, new UpdateRequestEvent(dir, url, zip));
|
sendResult(new UpdateRequestEvent(dir, url, zip));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue