mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-30 01:50:50 +01:00
Merge branch 'fix-ban-empty-machine-id' into 'dev'
fix ban behavior for empty machine id/ip address See merge request morningstar/Arcturus-Community!398
This commit is contained in:
commit
e03a76f30c
@ -428,6 +428,16 @@ public class ModToolManager {
|
||||
return bans;
|
||||
}
|
||||
|
||||
//if machine id is empty, downgrade ban type to IP ban
|
||||
if( (type == ModToolBanType.MACHINE || type == ModToolBanType.SUPER) && (offlineInfo == null || offlineInfo.getMachineID().isEmpty())) {
|
||||
type = ModToolBanType.IP;
|
||||
}
|
||||
|
||||
//if ip address is empty, downgrade ban type to account ban
|
||||
if( (type == ModToolBanType.IP || type == ModToolBanType.SUPER) && (offlineInfo == null || offlineInfo.getIpLogin().isEmpty())) {
|
||||
type = ModToolBanType.ACCOUNT;
|
||||
}
|
||||
|
||||
ModToolBan ban = new ModToolBan(targetUserId, offlineInfo != null ? offlineInfo.getIpLogin() : "offline", offlineInfo != null ? offlineInfo.getMachineID() : "offline", moderator.getHabboInfo().getId(), Emulator.getIntUnixTimestamp() + duration, reason, type, cfhTopic);
|
||||
Emulator.getPluginManager().fireEvent(new SupportUserBannedEvent(moderator, target, ban));
|
||||
Emulator.getThreading().run(ban);
|
||||
|
Loading…
Reference in New Issue
Block a user