Hi,
Does anyone have the command that refreshes wordfilter table so people can't write swear words? because i got the wordfilter working but only thing i need is that command. Someone who can help?
Best regards,
Spoon
Hi,
Does anyone have the command that refreshes wordfilter table so people can't write swear words? because i got the wordfilter working but only thing i need is that command. Someone who can help?
Best regards,
Spoon
Maybe this will help you
Go to HabboHotel/Rooms/Roomdata.cs, find the function Fill(DataRow Row) and replace
with:queryreactor.setQuery("SELECT word FROM room_wordfilter WHERE room_id = @id");
queryreactor.addParameter("id", this.Id);
DataTable table2 = queryreactor.getTable();
foreach (DataRow dataRow2 in table2.Rows)
{this.WordFilter.Add(dataRow2["word"].ToString());}
After this, add this to the same file:LoadWords(queryreactor);
And now you can add this command to HabboHotel/Misc/ChatCommandHandler.cs:internal void LoadWords(IQueryAdapter dbClient)
{this.WordFilter = new List<string>();dbClient.setQuery("SELECT word FROM room_wordfilter WHERE room_id = @id");dbClient.addParameter("id", this.Id);DataTable table = dbClient.getTable();
foreach (DataRow dataRow in table.Rows){this.WordFilter.Add(dataRow["word"].ToString());}}
I hope it will work.case "refreshwords":if (this.Session.GetHabbo().GotCommand("refreshwords")){Room room = this.Session.GetHabbo().CurrentRoom;
if ((room != null) && room.CheckRights(this.Session, true, false)){using (IQueryAdapter queryreactor = MercuryEnvironment.GetDatabaseManager().getQueryreactor())
{room.RoomData.LoadWords(queryreactor);}}}return true;
PS: Sorry for my bad English, I'm Dutch.