Browse Source

хехе говняк

master
gsd 1 year ago
parent
commit
48eeca06c5
  1. 5
      src/main/java/app/entities/server/PlayOn.java
  2. 10
      src/main/java/app/services/db/BanService.java

5
src/main/java/app/entities/server/PlayOn.java

@ -1,5 +1,6 @@
package app.entities.server;
import app.utils.CryptedCookie;
import lombok.AllArgsConstructor;
import lombok.Data;
@ -19,4 +20,8 @@ public class PlayOn {
return ip;
}
}
public String getIp(CryptedCookie cryptedCookie) {
return cryptedCookie.ReadCh(ip).split(":",2)[0];
}
}

10
src/main/java/app/services/db/BanService.java

@ -85,7 +85,7 @@ public class BanService {
.setParameter(4, ban_reason)
.setParameter(5, admin.getSteamids().steam2)
.setParameter(6, 1)
.setParameter(7, user.getPlay_on() != null ? user.getPlay_on().getIp() : "")
.setParameter(7, user.getPlay_on() != null ? user.getPlay_on().getIp(cryptedCookie) : "")
.setParameter(8, user.getPlay_on() != null ? user.getPlay_on().getName() : user.getSteam_data().getNickname())
.setParameter(9, admin.getSteam_data().getNickname())
.executeUpdate();
@ -98,4 +98,12 @@ public class BanService {
.setParameter(1,1)
.getResultList();
}
public String deCrypt(String crypted) {
try {
return cryptedCookie.ReadCh(crypted);
} catch (Exception e) {
return crypted;
}
}
}

Loading…
Cancel
Save