Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Releases
Server Releases
[Plus Emulator] Add Wordfilter
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="MasterJiq" data-source="post: 398037" data-attributes="member: 69646"><p>Hello,</p><p></p><p>I would to release my second one command edit with Plus Emulator, just playing around with it.</p><p>So here is the code, it would be 'AddWordfilter.cs' or whatever do you want.</p><p>[CODE]using System;</p><p>using System.Linq;</p><p>using System.Text;</p><p>using System.Collections.Generic;</p><p></p><p>using Plus.Communication.Packets.Outgoing.Catalog;</p><p>using Plus.Core;</p><p>using Plus.Database.Interfaces;</p><p>using Plus.Communication.Packets.Outgoing.Notifications;</p><p>using Plus.HabboHotel.GameClients;</p><p>namespace Plus.HabboHotel.Rooms.Chat.Commands.Moderator</p><p>{</p><p> class AddWordFilter: IChatCommand</p><p> {</p><p> public string PermissionRequired</p><p> {</p><p> get { return "command_update"; }</p><p> }</p><p></p><p> public string Parameters</p><p> {</p><p> get { return "%variable%"; }</p><p> }</p><p></p><p> public string Description</p><p> {</p><p> get { return "Add a restricted word"; }</p><p> }</p><p></p><p> public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)</p><p> {</p><p> if (!Session.GetHabbo().GetPermissions().HasCommand("command_update"))</p><p> {</p><p> Session.SendWhisper("Oops, you do not have the permission.");</p><p> }</p><p> if (Params.Length == 1)</p><p> {</p><p> Session.SendWhisper("Put the word to be blacklist.");</p><p> return;</p><p> }</p><p> string word = Params[1];</p><p> using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor())</p><p> {</p><p> dbClient.SetQuery("INSERT INTO `wordfilter` (word, replacement, strict, addedby, bannable) VALUES (@word, @replace, '1', @username, '0');");</p><p> dbClient.AddParameter("word", word);</p><p> dbClient.AddParameter("replace", "censored");</p><p> dbClient.AddParameter("username", Session.GetHabbo().Username);</p><p> dbClient.RunQuery();</p><p> Session.SendWhisper("Added the word, please use :update filter to make the system worked.");</p><p> }</p><p> }</p><p> }</p><p>}[/CODE]</p><p></p><p>Thanks.</p></blockquote><p></p>
[QUOTE="MasterJiq, post: 398037, member: 69646"] Hello, I would to release my second one command edit with Plus Emulator, just playing around with it. So here is the code, it would be 'AddWordfilter.cs' or whatever do you want. [CODE]using System; using System.Linq; using System.Text; using System.Collections.Generic; using Plus.Communication.Packets.Outgoing.Catalog; using Plus.Core; using Plus.Database.Interfaces; using Plus.Communication.Packets.Outgoing.Notifications; using Plus.HabboHotel.GameClients; namespace Plus.HabboHotel.Rooms.Chat.Commands.Moderator { class AddWordFilter: IChatCommand { public string PermissionRequired { get { return "command_update"; } } public string Parameters { get { return "%variable%"; } } public string Description { get { return "Add a restricted word"; } } public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params) { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update")) { Session.SendWhisper("Oops, you do not have the permission."); } if (Params.Length == 1) { Session.SendWhisper("Put the word to be blacklist."); return; } string word = Params[1]; using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor()) { dbClient.SetQuery("INSERT INTO `wordfilter` (word, replacement, strict, addedby, bannable) VALUES (@word, @replace, '1', @username, '0');"); dbClient.AddParameter("word", word); dbClient.AddParameter("replace", "censored"); dbClient.AddParameter("username", Session.GetHabbo().Username); dbClient.RunQuery(); Session.SendWhisper("Added the word, please use :update filter to make the system worked."); } } } }[/CODE] Thanks. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Releases
Server Releases
[Plus Emulator] Add Wordfilter
Top