Apply wordfilter on more user-input fields

This commit is contained in:
Yordi 2024-10-17 16:09:19 +00:00 committed by ArpyAge
parent 0a6355996a
commit 5926c9d898
5 changed files with 7 additions and 7 deletions

View File

@ -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();

View File

@ -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;

View File

@ -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);

View File

@ -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") + ""));

View File

@ -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;