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 Q&A
Mute does not end!
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="jadexxz" data-source="post: 461756" data-attributes="member: 94095"><p>Slopt Emulator, do you want the MuteCommand.cs?</p><p>[automerge]1592236557[/automerge]</p><p></p><p>[CODE]using System;</p><p>using System.Linq;</p><p>using System.Text;</p><p>using System.Collections.Generic;</p><p>using Slopt.Database.Interfaces;</p><p>using Slopt.Utilities;</p><p>using Slopt.HabboHotel.Users;</p><p>using Slopt.HabboHotel.GameClients;</p><p></p><p></p><p></p><p>namespace Slopt.HabboHotel.Rooms.Chat.Commands.Moderator</p><p>{</p><p> class MuteCommand : IChatCommand</p><p> {</p><p> public string PermissionRequired</p><p> {</p><p> get { return "command_mute"; }</p><p> }</p><p></p><p> public string Parameters</p><p> {</p><p> get { return "%username% %time%"; }</p><p> }</p><p></p><p> public string Description</p><p> {</p><p> get { return "Mutea a un usuario por cierto tiempo"; }</p><p> }</p><p></p><p> public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)</p><p> {</p><p> if (Params.Length == 1)</p><p> {</p><p> Session.SendWhisper("Introduce el nombre del usuario a mutear y el tiempo expresado en Segundos (Maximo 600).");</p><p> return;</p><p> }</p><p></p><p> Habbo Habbo = SloptEnvironment.GetHabboByUsername(Params[1]);</p><p> if (Habbo == null)</p><p> {</p><p> Session.SendWhisper("Ocurrio un error mientras se buscaba al usuario en la base de datos.");</p><p> return;</p><p> }</p><p></p><p> if (Habbo.GetPermissions().HasRight("mod_tool") && !Session.GetHabbo().GetPermissions().HasRight("mod_mute_any"))</p><p> {</p><p> Session.SendWhisper("Oops, al parecer no se puede mutear a este usuario.");</p><p> return;</p><p> }</p><p></p><p> double Time;</p><p> if (double.TryParse(Params[2], out Time))</p><p> {</p><p> if (Time > 600 && !Session.GetHabbo().GetPermissions().HasRight("mod_mute_limit_override"))</p><p> Time = 600;</p><p></p><p> using (IQueryAdapter dbClient = SloptEnvironment.GetDatabaseManager().GetQueryReactor())</p><p> {</p><p> dbClient.RunQuery("UPDATE `users` SET `time_muted` = '" + Time + "' WHERE `id` = '" + Habbo.Id + "' LIMIT 1");</p><p> }</p><p></p><p> if (Habbo.GetClient() != null)</p><p> {</p><p> Habbo.TimeMuted = Time;</p><p> Habbo.GetClient().SendNotification("Usted ha sido muteado " + Time + " segundos!");</p><p> }</p><p></p><p> Session.SendWhisper("Muteaste a " + Habbo.Username + " por " + Time + " segundos.");</p><p> }</p><p> else</p><p> Session.SendWhisper("Por favor introduce numeros enteros.");</p><p> }</p><p> }</p><p>}[/CODE]</p></blockquote><p></p>
[QUOTE="jadexxz, post: 461756, member: 94095"] Slopt Emulator, do you want the MuteCommand.cs? [automerge]1592236557[/automerge] [CODE]using System; using System.Linq; using System.Text; using System.Collections.Generic; using Slopt.Database.Interfaces; using Slopt.Utilities; using Slopt.HabboHotel.Users; using Slopt.HabboHotel.GameClients; namespace Slopt.HabboHotel.Rooms.Chat.Commands.Moderator { class MuteCommand : IChatCommand { public string PermissionRequired { get { return "command_mute"; } } public string Parameters { get { return "%username% %time%"; } } public string Description { get { return "Mutea a un usuario por cierto tiempo"; } } public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params) { if (Params.Length == 1) { Session.SendWhisper("Introduce el nombre del usuario a mutear y el tiempo expresado en Segundos (Maximo 600)."); return; } Habbo Habbo = SloptEnvironment.GetHabboByUsername(Params[1]); if (Habbo == null) { Session.SendWhisper("Ocurrio un error mientras se buscaba al usuario en la base de datos."); return; } if (Habbo.GetPermissions().HasRight("mod_tool") && !Session.GetHabbo().GetPermissions().HasRight("mod_mute_any")) { Session.SendWhisper("Oops, al parecer no se puede mutear a este usuario."); return; } double Time; if (double.TryParse(Params[2], out Time)) { if (Time > 600 && !Session.GetHabbo().GetPermissions().HasRight("mod_mute_limit_override")) Time = 600; using (IQueryAdapter dbClient = SloptEnvironment.GetDatabaseManager().GetQueryReactor()) { dbClient.RunQuery("UPDATE `users` SET `time_muted` = '" + Time + "' WHERE `id` = '" + Habbo.Id + "' LIMIT 1"); } if (Habbo.GetClient() != null) { Habbo.TimeMuted = Time; Habbo.GetClient().SendNotification("Usted ha sido muteado " + Time + " segundos!"); } Session.SendWhisper("Muteaste a " + Habbo.Username + " por " + Time + " segundos."); } else Session.SendWhisper("Por favor introduce numeros enteros."); } } }[/CODE] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
Mute does not end!
Top