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] Command Erase Chatlog
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="Marko97" data-source="post: 425203" data-attributes="member: 36313"><p>Hi,</p><p>Today I will share with you a mini command made by me.</p><p>This command perform the erase for chatlogs.</p><p></p><p><strong>1. </strong>Go to<strong> HabboHotel/Rooms/Chat/Commands/Administrator </strong>and create a new class called:<strong> EraseChatlogCommand.cs </strong>and paste this:</p><p>[CODE]</p><p>using Plus.HabboHotel.GameClients;</p><p>using Plus.Database.Interfaces;</p><p></p><p>namespace Plus.HabboHotel.Rooms.Chat.Commands.Administrator</p><p>{</p><p> class EraseChatlogCommand : IChatCommand</p><p> {</p><p> public string PermissionRequired</p><p> {</p><p> get { return "command_erasechatlog"; }</p><p> }</p><p></p><p> public string Parameters</p><p> {</p><p> get { return ""; }</p><p> }</p><p></p><p> public string Description</p><p> {</p><p> get { return "Erase the chatlog."; }</p><p> }</p><p></p><p> public void Execute(GameClient Session, Room Room, string[] Params)</p><p> {</p><p> using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor())</p><p> {</p><p> dbClient.RunQuery("TRUNCATE chatlogs");</p><p> }</p><p></p><p> Session.SendNotification("Chatlog erased.");</p><p> }</p><p> }</p><p>}</p><p>[/CODE]</p><p></p><p><strong>2.</strong> Go to <strong>HabboHotel/Rooms/Chat/Commands/CommandManager.cs </strong>and after</p><p>[CODE]</p><p>this.Register("update", new UpdateCommand());</p><p>[/CODE]</p><p>add this:</p><p>[CODE]</p><p>this.Register("erasechatlog", new EraseChatlogCommand());</p><p>[/CODE]</p><p>:</p><p><strong>3. </strong>In your database run this MySQL Query:</p><p>[CODE]</p><p>INSERT INTO `permissions_commands` (`command`, `group_id`, `subscription_id`) VALUES ('command_erasechatlog', '1', '1');</p><p>[/CODE]</p><p><em>Note: You can change the rank and Vip rank modifying '1' (Rank), '1' (Vip rank) at your leisure.</em></p><p><em></em></p><p>Done! To launch the command use :erasechatlog.</p><p></p><p><span style="color: #ff0000"><strong>IF YOU WANT DELETE ONLY ROOM MESSAGGES YOU CAN FOLLOW THIS:</strong></span></p><p><span style="color: #ff0000"></span></p></blockquote><p></p>
[QUOTE="Marko97, post: 425203, member: 36313"] Hi, Today I will share with you a mini command made by me. This command perform the erase for chatlogs. [B]1. [/B]Go to[B] HabboHotel/Rooms/Chat/Commands/Administrator [/B]and create a new class called:[B] EraseChatlogCommand.cs [/B]and paste this: [CODE] using Plus.HabboHotel.GameClients; using Plus.Database.Interfaces; namespace Plus.HabboHotel.Rooms.Chat.Commands.Administrator { class EraseChatlogCommand : IChatCommand { public string PermissionRequired { get { return "command_erasechatlog"; } } public string Parameters { get { return ""; } } public string Description { get { return "Erase the chatlog."; } } public void Execute(GameClient Session, Room Room, string[] Params) { using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor()) { dbClient.RunQuery("TRUNCATE chatlogs"); } Session.SendNotification("Chatlog erased."); } } } [/CODE] [B]2.[/B] Go to [B]HabboHotel/Rooms/Chat/Commands/CommandManager.cs [/B]and after [CODE] this.Register("update", new UpdateCommand()); [/CODE] add this: [CODE] this.Register("erasechatlog", new EraseChatlogCommand()); [/CODE] : [B]3. [/B]In your database run this MySQL Query: [CODE] INSERT INTO `permissions_commands` (`command`, `group_id`, `subscription_id`) VALUES ('command_erasechatlog', '1', '1'); [/CODE] [I]Note: You can change the rank and Vip rank modifying '1' (Rank), '1' (Vip rank) at your leisure. [/I] Done! To launch the command use :erasechatlog. [COLOR=#ff0000][B]IF YOU WANT DELETE ONLY ROOM MESSAGGES YOU CAN FOLLOW THIS:[/B] [/COLOR] [COLOR=#404040][/COLOR] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Releases
Server Releases
[Plus Emulator] Command Erase Chatlog
Top