mirror of
https://github.com/Melledy/Nebula.git
synced 2026-11-04 21:36:51 +01:00
Implement ban functionality
- Added ban module - Added Ban and Unban commands, supporting banning and unbanning players through various command parameters. - Added timestamp formatting method in Utils utility class for displaying ban expiration times - Introduced PlayerErrorCode enum defining various error codes including ErrBan - Added dual ban checking for both IP and user during player login - Optimized login failure responses to provide specific error reasons and parameters
This commit is contained in:
1 parent
6483e8a5a7
commit
3a6387c2bd
11 files changed
+750
-9
No files matched your search
@@ -24,6 +24,7 @@ public class GameSession {
|
||||
private String token;
|
||||
private Account account;
|
||||
private Player player;
|
||||
private String ipAddress;
|
||||
|
||||
// Crypto
|
||||
private int encryptMethod; // 0 = gcm, 1 = chacha20
|
||||
@@ -143,6 +144,10 @@ public class GameSession {
|
||||
this.lastActiveTime = System.currentTimeMillis();
|
||||
}
|
||||
|
||||
public void updateIpAddress(String ip) {
|
||||
this.ipAddress = ip;
|
||||
}
|
||||
|
||||
// Packet encoding helper functions
|
||||
|
||||
@SneakyThrows
|
||||
|
||||
Reference in new issue
Block a user