[SWIFT] IPBAN (paying)

Results 1 to 3 of 3
  1. #1
    Proficient Member asic is offline
    MemberRank
    Feb 2011 Join Date
    ScandinaviaLocation
    153Posts

    [SWIFT] IPBAN (paying)

    Hi, I need to fix the ipban command. (superban in swift)

    Could anyone help me? I am willing to pay you for a fix.


  2. #2
    Proficient Member Marlon Colhado is offline
    MemberRank
    Jan 2009 Join Date
    BrazilLocation
    178Posts

    Re: [SWIFT] IPBAN (paying)

    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().UsernameclientByUsername.GetHabbo().Username"Ban""Long ban for " num " seconds");
                    if (
    num <= 600)
                    {
                        
    this.Session.SendNotif(LanguageLocale.GetValue("ban.toolesstime"));
                    }
                    else
                    {
                        
    ModerationTool.BanUser(this.SessionclientByUsername.GetHabbo().IdnumMergeParams(this.Params3), 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 ModSessionuint UserIdint Lengthstring Messagebool 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(clientByUserIDModSession.GetHabbo().UsernamelengthSecondsMessagetrue);
                        }
                        else
                        {
                            
    ButterflyEnvironment.GetGame().GetBanManager().BanUser(clientByUserIDModSession.GetHabbo().UsernamelengthSecondsMessagefalse);
                        }
                    }
                }
            } 
    To ban the User, use:
    :superban Username TimeInMinutes Message
    Example:
    :superban MarlonColhado 60 Test

    Says, if does not operate.
    Thanks, :)

  3. #3
    Proficient Member asic is offline
    MemberRank
    Feb 2011 Join Date
    ScandinaviaLocation
    153Posts

    Re: [SWIFT] IPBAN (paying)

    Quote Originally Posted by Marlon Colhado View Post
    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().UsernameclientByUsername.GetHabbo().Username"Ban""Long ban for " num " seconds");
                    if (
    num <= 600)
                    {
                        
    this.Session.SendNotif(LanguageLocale.GetValue("ban.toolesstime"));
                    }
                    else
                    {
                        
    ModerationTool.BanUser(this.SessionclientByUsername.GetHabbo().IdnumMergeParams(this.Params3), 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 ModSessionuint UserIdint Lengthstring Messagebool 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(clientByUserIDModSession.GetHabbo().UsernamelengthSecondsMessagetrue);
                        }
                        else
                        {
                            
    ButterflyEnvironment.GetGame().GetBanManager().BanUser(clientByUserIDModSession.GetHabbo().UsernamelengthSecondsMessagefalse);
                        }
                    }
                }
            } 
    To ban the User, use:
    :superban Username TimeInMinutes Message
    Example:
    :superban MarlonColhado 60 Test

    Says, if does not operate.
    Thanks, :)
    Thanks, you're awesome!



Advertisement