mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2025-01-18 23:46:28 +01:00
Apply wordfilter on more user-input fields
This commit is contained in:
parent
0a6355996a
commit
5926c9d898
@ -61,7 +61,7 @@ public class CatalogBuyItemAsGiftEvent extends MessageHandler {
|
|||||||
int itemId = this.packet.readInt();
|
int itemId = this.packet.readInt();
|
||||||
String extraData = this.packet.readString();
|
String extraData = this.packet.readString();
|
||||||
String username = 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 spriteId = this.packet.readInt();
|
||||||
int color = this.packet.readInt();
|
int color = this.packet.readInt();
|
||||||
int ribbonId = this.packet.readInt();
|
int ribbonId = this.packet.readInt();
|
||||||
|
@ -21,8 +21,8 @@ public class RequestGuildBuyEvent extends MessageHandler {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void handle() throws Exception {
|
public void handle() throws Exception {
|
||||||
String name = this.packet.readString();
|
String name = Emulator.getGameEnvironment().getWordFilter().filter(this.packet.readString(), this.client.getHabbo());
|
||||||
String description = this.packet.readString();
|
String description = Emulator.getGameEnvironment().getWordFilter().filter(this.packet.readString(), this.client.getHabbo());
|
||||||
|
|
||||||
if(name.length() > 29 || description.length() > 254)
|
if(name.length() > 29 || description.length() > 254)
|
||||||
return;
|
return;
|
||||||
|
@ -24,8 +24,8 @@ public class GuildForumPostThreadEvent extends MessageHandler {
|
|||||||
public void handle() throws Exception {
|
public void handle() throws Exception {
|
||||||
int guildId = this.packet.readInt();
|
int guildId = this.packet.readInt();
|
||||||
int threadId = this.packet.readInt();
|
int threadId = this.packet.readInt();
|
||||||
String subject = this.packet.readString();
|
String subject = Emulator.getGameEnvironment().getWordFilter().filter(this.packet.readString(), this.client.getHabbo());
|
||||||
String message = this.packet.readString();
|
String message = Emulator.getGameEnvironment().getWordFilter().filter(this.packet.readString(), this.client.getHabbo());
|
||||||
|
|
||||||
Guild guild = Emulator.getGameEnvironment().getGuildManager().getGuild(guildId);
|
Guild guild = Emulator.getGameEnvironment().getGuildManager().getGuild(guildId);
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ public class PostItSaveDataEvent extends MessageHandler {
|
|||||||
public void handle() throws Exception {
|
public void handle() throws Exception {
|
||||||
int itemId = this.packet.readInt();
|
int itemId = this.packet.readInt();
|
||||||
String color = this.packet.readString();
|
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")) {
|
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") + ""));
|
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 {
|
public class SaveMottoEvent extends MessageHandler {
|
||||||
@Override
|
@Override
|
||||||
public void handle() throws Exception {
|
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);
|
UserSavedMottoEvent event = new UserSavedMottoEvent(this.client.getHabbo(), this.client.getHabbo().getHabboInfo().getMotto(), motto);
|
||||||
Emulator.getPluginManager().fireEvent(event);
|
Emulator.getPluginManager().fireEvent(event);
|
||||||
motto = event.newMotto;
|
motto = event.newMotto;
|
||||||
|
Loading…
Reference in New Issue
Block a user