Search by: internal void superban() in ChatCommandHandler.cs
And replace all void, by:
PHP Code:
internal void superban()
{
GameClient clientByUsername = null;
Room currentRoom = this.Session.GetHabbo().CurrentRoom;
clientByUsername = ButterflyEnvironment.GetGame().GetClientManager().GetClientByUsername(this.Params[1]);
if (clientByUsername == null)
{
this.Session.SendNotif(LanguageLocale.GetValue("input.usernotfound"));
}
else if (clientByUsername.GetHabbo().Rank >= this.Session.GetHabbo().Rank)
{
this.Session.SendNotif(LanguageLocale.GetValue("ban.notallowed"));
}
else
{
int num;
try
{
num = int.Parse(this.Params[2]);
}
catch (FormatException)
{
return;
}
num = num * 60;
ButterflyEnvironment.GetGame().GetModerationTool().LogStaffEntry(this.Session.GetHabbo().Username, clientByUsername.GetHabbo().Username, "Ban", "Long ban for " + num + " seconds");
if (num <= 600)
{
this.Session.SendNotif(LanguageLocale.GetValue("ban.toolesstime"));
}
else
{
ModerationTool.BanUser(this.Session, clientByUsername.GetHabbo().Id, num, MergeParams(this.Params, 3), true);
}
}
}
And, search by: internal static void BanUser(GameClient ModSession in ModerationTool.cs, add this after the void (WARNING: DON'T REPLACE, YOU NEED TO ADD AFTER THIS VOID..):
PHP Code:
internal static void BanUser(GameClient ModSession, uint UserId, int Length, string Message, bool IpBan)
{
GameClient clientByUserID = ButterflyEnvironment.GetGame().GetClientManager().GetClientByUserID(UserId);
if ((clientByUserID != null) && (clientByUserID.GetHabbo().Id != ModSession.GetHabbo().Id))
{
if (clientByUserID.GetHabbo().Rank >= ModSession.GetHabbo().Rank)
{
ModSession.SendNotif(LanguageLocale.GetValue("moderation.ban.missingrank"));
}
else
{
double lengthSeconds = Length;
if (IpBan)
{
ButterflyEnvironment.GetGame().GetBanManager().BanUser(clientByUserID, ModSession.GetHabbo().Username, lengthSeconds, Message, true);
}
else
{
ButterflyEnvironment.GetGame().GetBanManager().BanUser(clientByUserID, ModSession.GetHabbo().Username, lengthSeconds, Message, false);
}
}
}
}
To ban the User, use:
:superban Username TimeInMinutes Message
Example:
:superban MarlonColhado 60 Test
Says, if does not operate.
Thanks, :)