mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2025-01-18 15:36:27 +01:00
Merge branch 'improvement/additional-wordfilter' into 'dev'
Apply wordfilter on more user-input fields See merge request morningstar/Arcturus-Community!89
This commit is contained in:
commit
73b8f9130a
@ -61,7 +61,7 @@ public class CatalogBuyItemAsGiftEvent extends MessageHandler {
|
||||
int itemId = this.packet.readInt();
|
||||
String extraData = this.packet.readString();
|
||||
String username = this.packet.readString();
|
||||
String message = this.packet.readString();
|
||||
String message = Emulator.getGameEnvironment().getWordFilter().filter(this.packet.readString(), this.client.getHabbo());
|
||||
int spriteId = this.packet.readInt();
|
||||
int color = this.packet.readInt();
|
||||
int ribbonId = this.packet.readInt();
|
||||
|
@ -21,8 +21,8 @@ public class RequestGuildBuyEvent extends MessageHandler {
|
||||
|
||||
@Override
|
||||
public void handle() throws Exception {
|
||||
String name = this.packet.readString();
|
||||
String description = this.packet.readString();
|
||||
String name = Emulator.getGameEnvironment().getWordFilter().filter(this.packet.readString(), this.client.getHabbo());
|
||||
String description = Emulator.getGameEnvironment().getWordFilter().filter(this.packet.readString(), this.client.getHabbo());
|
||||
|
||||
if(name.length() > 29 || description.length() > 254)
|
||||
return;
|
||||
|
@ -24,8 +24,8 @@ public class GuildForumPostThreadEvent extends MessageHandler {
|
||||
public void handle() throws Exception {
|
||||
int guildId = this.packet.readInt();
|
||||
int threadId = this.packet.readInt();
|
||||
String subject = this.packet.readString();
|
||||
String message = this.packet.readString();
|
||||
String subject = Emulator.getGameEnvironment().getWordFilter().filter(this.packet.readString(), this.client.getHabbo());
|
||||
String message = Emulator.getGameEnvironment().getWordFilter().filter(this.packet.readString(), this.client.getHabbo());
|
||||
|
||||
Guild guild = Emulator.getGameEnvironment().getGuildManager().getGuild(guildId);
|
||||
|
||||
|
@ -18,7 +18,7 @@ public class PostItSaveDataEvent extends MessageHandler {
|
||||
public void handle() throws Exception {
|
||||
int itemId = this.packet.readInt();
|
||||
String color = this.packet.readString();
|
||||
String text = this.packet.readString().replace(((char) 9) + "", "");
|
||||
String text = Emulator.getGameEnvironment().getWordFilter().filter(this.packet.readString().replace(((char) 9) + "", ""), this.client.getHabbo());
|
||||
|
||||
if (text.length() > Emulator.getConfig().getInt("postit.charlimit")) {
|
||||
ScripterManager.scripterDetected(this.client, Emulator.getTexts().getValue("scripter.warning.sticky.size").replace("%username%", this.client.getHabbo().getHabboInfo().getUsername()).replace("%amount%", text.length() + "").replace("%limit%", Emulator.getConfig().getInt("postit.charlimit") + ""));
|
||||
|
@ -9,7 +9,7 @@ import com.eu.habbo.plugin.events.users.UserSavedMottoEvent;
|
||||
public class SaveMottoEvent extends MessageHandler {
|
||||
@Override
|
||||
public void handle() throws Exception {
|
||||
String motto = this.packet.readString();
|
||||
String motto = Emulator.getGameEnvironment().getWordFilter().filter(this.packet.readString(), this.client.getHabbo());
|
||||
UserSavedMottoEvent event = new UserSavedMottoEvent(this.client.getHabbo(), this.client.getHabbo().getHabboInfo().getMotto(), motto);
|
||||
Emulator.getPluginManager().fireEvent(event);
|
||||
motto = event.newMotto;
|
||||
|
Loading…
Reference in New Issue
Block a user