diff --git a/src/main/java/net/krakatoa/proxy/listener/PostLoginListener.java b/src/main/java/net/krakatoa/proxy/listener/PostLoginListener.java index 19c29b3..f6a04bb 100644 --- a/src/main/java/net/krakatoa/proxy/listener/PostLoginListener.java +++ b/src/main/java/net/krakatoa/proxy/listener/PostLoginListener.java @@ -71,6 +71,25 @@ public class PostLoginListener implements Listener { // redis ProxySystem.getInstance().getLogger().info("mongodb player " + document.keySet()); + RMap map = ProxySystem.getInstance().getRedisManager() + .getRedissonClient() + .getMap("player:" + uuid); + + if (map.isEmpty()) { + map.put("uuid", uuid); + map.put("voiceWebCode", "voiceWebCode"); + + document.forEach((key, value) -> { + ProxySystem.getInstance().getLogger() + .info("key " + key + " value " + value.toString()); + map.put(key, value.toString()); + }); + ProxySystem.getInstance().getLogger().info("PUT !"); + } else { + ProxySystem.getInstance().getLogger() + .warning("REDIS player " + uuid + " exists in the cache, but should not exist"); + } + // check if both sockets connected int cmdID = ProxySystem.getInstance().getKraSocketClientProtocol().generateCmdID();