mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-27 08:50:51 +01:00
Merge branch '318-sanction0ed' into 'dev'
fix(ModToolSanctionEvents): run if timestamp is back to 0 See merge request morningstar/Arcturus-Community!85
This commit is contained in:
commit
2ee6332aed
@ -36,6 +36,8 @@ public class ModToolSanctionAlertEvent extends MessageHandler {
|
|||||||
|
|
||||||
if (item != null && item.probationTimestamp > 0 && item.probationTimestamp >= Emulator.getIntUnixTimestamp()) {
|
if (item != null && item.probationTimestamp > 0 && item.probationTimestamp >= Emulator.getIntUnixTimestamp()) {
|
||||||
modToolSanctions.run(userId, this.client.getHabbo(), item.sanctionLevel, cfhTopic, message, 0, false, 0);
|
modToolSanctions.run(userId, this.client.getHabbo(), item.sanctionLevel, cfhTopic, message, 0, false, 0);
|
||||||
|
} else {
|
||||||
|
modToolSanctions.run(userId, this.client.getHabbo(), item.sanctionLevel, cfhTopic, message, 0, false, 0);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
modToolSanctions.run(userId, this.client.getHabbo(), 0, cfhTopic, message, 0, false, 0);
|
modToolSanctions.run(userId, this.client.getHabbo(), 0, cfhTopic, message, 0, false, 0);
|
||||||
|
@ -60,6 +60,8 @@ public class ModToolSanctionBanEvent extends MessageHandler {
|
|||||||
|
|
||||||
if (item.probationTimestamp > 0 && item.probationTimestamp >= Emulator.getIntUnixTimestamp()) {
|
if (item.probationTimestamp > 0 && item.probationTimestamp >= Emulator.getIntUnixTimestamp()) {
|
||||||
modToolSanctions.run(userId, this.client.getHabbo(), item.sanctionLevel, cfhTopic, message, 0, false, 0);
|
modToolSanctions.run(userId, this.client.getHabbo(), item.sanctionLevel, cfhTopic, message, 0, false, 0);
|
||||||
|
} else {
|
||||||
|
modToolSanctions.run(userId, this.client.getHabbo(), item.sanctionLevel, cfhTopic, message, 0, false, 0);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
modToolSanctions.run(userId, this.client.getHabbo(), 0, cfhTopic, message, 0, false, 0);
|
modToolSanctions.run(userId, this.client.getHabbo(), 0, cfhTopic, message, 0, false, 0);
|
||||||
|
@ -41,6 +41,12 @@ public class ModToolSanctionMuteEvent extends MessageHandler {
|
|||||||
|
|
||||||
int muteDurationTimestamp = Math.toIntExact(new Date( System.currentTimeMillis() + (modToolSanctionLevelItem.sanctionHourLength * 60 * 60)).getTime() / 1000);
|
int muteDurationTimestamp = Math.toIntExact(new Date( System.currentTimeMillis() + (modToolSanctionLevelItem.sanctionHourLength * 60 * 60)).getTime() / 1000);
|
||||||
|
|
||||||
|
modToolSanctions.run(userId, this.client.getHabbo(), item.sanctionLevel, cfhTopic, message, 0, true, muteDurationTimestamp);
|
||||||
|
} else {
|
||||||
|
ModToolSanctionLevelItem modToolSanctionLevelItem = modToolSanctions.getSanctionLevelItem(item.sanctionLevel);
|
||||||
|
|
||||||
|
int muteDurationTimestamp = Math.toIntExact(new Date( System.currentTimeMillis() + (modToolSanctionLevelItem.sanctionHourLength * 60 * 60)).getTime() / 1000);
|
||||||
|
|
||||||
modToolSanctions.run(userId, this.client.getHabbo(), item.sanctionLevel, cfhTopic, message, 0, true, muteDurationTimestamp);
|
modToolSanctions.run(userId, this.client.getHabbo(), item.sanctionLevel, cfhTopic, message, 0, true, muteDurationTimestamp);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -36,6 +36,8 @@ public class ModToolSanctionTradeLockEvent extends MessageHandler {
|
|||||||
|
|
||||||
if (item.probationTimestamp > 0 && item.probationTimestamp >= Emulator.getIntUnixTimestamp()) {
|
if (item.probationTimestamp > 0 && item.probationTimestamp >= Emulator.getIntUnixTimestamp()) {
|
||||||
modToolSanctions.run(userId, this.client.getHabbo(), item.sanctionLevel, cfhTopic, message, duration, false, 0);
|
modToolSanctions.run(userId, this.client.getHabbo(), item.sanctionLevel, cfhTopic, message, duration, false, 0);
|
||||||
|
} else {
|
||||||
|
modToolSanctions.run(userId, this.client.getHabbo(), item.sanctionLevel, cfhTopic, message, duration, false, 0);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
modToolSanctions.run(userId, this.client.getHabbo(), 0, cfhTopic, message, duration, false, 0);
|
modToolSanctions.run(userId, this.client.getHabbo(), 0, cfhTopic, message, duration, false, 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user