mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-22 16:41:46 +03:00
[FIX] DiscordBotConsole
This commit is contained in:
parent
89b800c124
commit
5e6ab3763e
4 changed files with 6 additions and 1 deletions
|
@ -84,6 +84,7 @@ public boolean accept(Client client, AuthProviderPair pair, String extendedToken
|
|||
if(client.permissions == null) client.permissions = new ClientPermissions();
|
||||
client.permissions.addPerm("launchserver.checkserver");
|
||||
client.permissions.addPerm(String.format("launchserver.profile.%s.show", info.serverName));
|
||||
client.setSerializableProperty("launchserver.serverName", info.serverName);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package pro.gravit.launchserver.manangers.hook;
|
||||
|
||||
import pro.gravit.launchserver.auth.core.User;
|
||||
import pro.gravit.launchserver.manangers.AuthManager;
|
||||
import pro.gravit.launchserver.socket.Client;
|
||||
import pro.gravit.launchserver.socket.response.auth.AuthResponse;
|
||||
import pro.gravit.launchserver.socket.response.auth.CheckServerResponse;
|
||||
|
@ -12,6 +14,7 @@ public class AuthHookManager {
|
|||
public final BiHookSet<AuthResponse.AuthContext, Client> preHook = new BiHookSet<>();
|
||||
public final BiHookSet<AuthResponse.AuthContext, Client> postHook = new BiHookSet<>();
|
||||
public final BiHookSet<CheckServerResponse, Client> checkServerHook = new BiHookSet<>();
|
||||
public final BiHookSet<AuthManager.CheckServerReport, Client> postCheckServerHook = new BiHookSet<>();
|
||||
public final BiHookSet<JoinServerResponse, Client> joinServerHook = new BiHookSet<>();
|
||||
public final BiHookSet<SetProfileResponse, Client> setProfileHook = new BiHookSet<>();
|
||||
public final HookSet<RegContext> registraion = new HookSet<>();
|
||||
|
|
|
@ -37,6 +37,7 @@ public void execute(ChannelHandlerContext ctx, Client pClient) {
|
|||
}
|
||||
result.playerProfile = report.playerProfile;
|
||||
result.uuid = report.uuid;
|
||||
server.authHookManager.postCheckServerHook.hook(report, pClient);
|
||||
logger.debug("checkServer: {} uuid: {} serverID: {}", result.playerProfile == null ? null : result.playerProfile.username, result.uuid, serverID);
|
||||
} catch (AuthException | HookException e) {
|
||||
sendError(e.getMessage());
|
||||
|
|
2
modules
2
modules
|
@ -1 +1 @@
|
|||
Subproject commit af6e144e4234851bfc5fd27b56584f510bc58bf6
|
||||
Subproject commit 75fd808a24a390907333e62076ee8e1556424e6b
|
Loading…
Reference in a new issue