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: 428470" data-attributes="member: 36313"><p><strong>1. </strong>Go to<strong> HabboHotel/Rooms/Chat/Commands/Administrator </strong>and create a new class called:<strong> EraseRoomChatlogCommand.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 EraseRoomChatlogCommand : IChatCommand</p><p> {</p><p> public string PermissionRequired</p><p> {</p><p> get { return "command_eraseroomchatlog"; }</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 room 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.SetQuery("DELETE FROM `chatlogs` WHERE `room_id` = @RoomId");</p><p> dbClient.AddParameter("RoomId", Session.GetHabbo().CurrentRoom.Id);</p><p> dbClient.RunQuery();</p><p> }</p><p></p><p> Session.SendNotification("All messagges in " + Session.GetHabbo().CurrentRoom.Name + "'s room have been deleted.");</p><p> }</p><p> }</p><p>}</p><p>[/CODE]</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("eraseroomchatlog", new EraseRoomChatlogCommand());</p><p>[/CODE]</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_eraseroomchatlog', '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></blockquote><p></p>
[QUOTE="Marko97, post: 428470, member: 36313"] [B]1. [/B]Go to[B] HabboHotel/Rooms/Chat/Commands/Administrator [/B]and create a new class called:[B] EraseRoomChatlogCommand.cs [/B]and paste this: [CODE] using Plus.HabboHotel.GameClients; using Plus.Database.Interfaces; namespace Plus.HabboHotel.Rooms.Chat.Commands.Administrator { class EraseRoomChatlogCommand : IChatCommand { public string PermissionRequired { get { return "command_eraseroomchatlog"; } } public string Parameters { get { return ""; } } public string Description { get { return "Erase the room chatlog."; } } public void Execute(GameClient Session, Room Room, string[] Params) { using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor()) { dbClient.SetQuery("DELETE FROM `chatlogs` WHERE `room_id` = @RoomId"); dbClient.AddParameter("RoomId", Session.GetHabbo().CurrentRoom.Id); dbClient.RunQuery(); } Session.SendNotification("All messagges in " + Session.GetHabbo().CurrentRoom.Name + "'s room have been deleted."); } } } [/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("eraseroomchatlog", new EraseRoomChatlogCommand()); [/CODE] [B]3. [/B]In your database run this MySQL Query: [CODE] INSERT INTO `permissions_commands` (`command`, `group_id`, `subscription_id`) VALUES ('command_eraseroomchatlog', '1', '1'); [/CODE] [I]Note: You can change the rank and Vip rank modifying '1' (Rank), '1' (Vip rank) at your leisure.[/I] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Releases
Server Releases
[Plus Emulator] Command Erase Chatlog
Top