[Release] Simple IP Ban

Page 1 of 3 123 LastLast
Results 1 to 15 of 39
  1. #1
    DarKGunZ Owner WooAf is offline
    MemberRank
    Dec 2007 Join Date
    CanadaLocation
    480Posts

    [Release] Simple IP Ban

    Procedure structure for [WZ_ACCOUNT_LOGIN_EXEC]


    Code:
    -- check if ip banned
        declare @idccid int
        SELECT
            @idccid=cid
        FROM BannedIP 
        WHERE ip=@in_IP
        
        if (@@ROWCOUNT != 0) begin
            select
                3 as LoginResult,
                0 as CustomerID,
                998 as AccountStatus
            return
        end

    BannedIP Table:

    Code:
    CREATE TABLE [dbo].[BannedIP](
        [id] [int] IDENTITY(1,1) NOT NULL,
        [cid] [int] NOT NULL,
        [ip] [varchar](15) NOT NULL,
        [reason] [varchar](max) NOT NULL,
        [bannedby] [int] NOT NULL,
        [date] [datetime] NOT NULL
    ) ON [PRIMARY]
    (You can edit the table how you want it)



    You can also change the error message on the launcher for the grade 998



    RSUpdate/Updater.cpp

    Code:
    case CLoginHelper::ANS_IPBANNED:
            loginErrMsg_ = "Your IP has been banned";
            break;
    RSUpdate/WOLoginHelper.cpp

    Code:
    if(AccountStatus == 998) {
            loginAnswerCode = ANS_IPBANNED;
            return;
        }
    Last edited by WooAf; 27-05-13 at 02:12 AM.


  2. #2
    Account Upgraded | Title Enabled! JonnyTruant is offline
    MemberRank
    Mar 2013 Join Date
    555Posts

    Re: [Release] Simple IP Ban

    How do I ban players using the BannedIP table?

  3. #3
    DarKGunZ Owner WooAf is offline
    MemberRank
    Dec 2007 Join Date
    CanadaLocation
    480Posts

    Re: [Release] Simple IP Ban

    Quote Originally Posted by JonnyTruant View Post
    How do I ban players using the BannedIP table?
    Just add a query with the banned ip wanted

  4. #4
    Account Upgraded | Title Enabled! JonnyTruant is offline
    MemberRank
    Mar 2013 Join Date
    555Posts

    Re: [Release] Simple IP Ban

    Quote Originally Posted by WooAf View Post
    Just add a query with the banned ip wanted
    Could you tell me an example please?

  5. #5
    DarKGunZ Owner WooAf is offline
    MemberRank
    Dec 2007 Join Date
    CanadaLocation
    480Posts

    Re: [Release] Simple IP Ban

    Quote Originally Posted by JonnyTruant View Post
    Could you tell me an example please?
    INSERT INTO BannedIP VALUES (1000000, '123.456.789.123', 'Hacking', 1000000, '2013-01-01 00:00:00')

  6. #6
    Account Upgraded | Title Enabled! JonnyTruant is offline
    MemberRank
    Mar 2013 Join Date
    555Posts

    Re: [Release] Simple IP Ban

    Quote Originally Posted by WooAf View Post
    INSERT INTO BannedIP VALUES (1000000, '123.456.789.123', 'Hacking', 1000000, '2013-01-01 00:00:00')
    For some reason when I ban my IP I get "invalid username or password"

  7. #7
    DarKGunZ Owner WooAf is offline
    MemberRank
    Dec 2007 Join Date
    CanadaLocation
    480Posts

    Re: [Release] Simple IP Ban

    Quote Originally Posted by JonnyTruant View Post
    For some reason when I ban my IP I get "invalid username or password"
    Yep, you need to add a message on your launcher

    Follow the step after :
    You can also change the error message on the launcher for the grade 998

  8. #8
    Account Upgraded | Title Enabled! JonnyTruant is offline
    MemberRank
    Mar 2013 Join Date
    555Posts

    Re: [Release] Simple IP Ban

    Quote Originally Posted by WooAf View Post
    Yep, you need to add a message on your launcher

    Follow the step after :
    How so would it be?

  9. #9
    DarKGunZ Owner WooAf is offline
    MemberRank
    Dec 2007 Join Date
    CanadaLocation
    480Posts
    Just follow my guide

    Sent from my Galaxy Nexus using Tapatalk 4 Beta

  10. #10
    Member MtHx62210 is offline
    MemberRank
    May 2013 Join Date
    74Posts

    Re: [Release] Simple IP Ban

    very thanks for you Ipbanned

  11. #11
    Account Upgraded | Title Enabled! JonnyTruant is offline
    MemberRank
    Mar 2013 Join Date
    555Posts

    Re: [Release] Simple IP Ban

    Well, I didn't understand your explanation "change message for grade 998"

  12. #12
    Member MtHx62210 is offline
    MemberRank
    May 2013 Join Date
    74Posts

    Re: [Release] Simple IP Ban

    Hello I have a question here is Ipban walks very well but here is for example when I me banns and when I am at stake I owe disconnect me from the game it do not disconnect me directly have you a solution

    Know how to expel you how a player who is at stake because for example I banns a player but if he does not disconnect completely from the game(set,play) this one can continue to play:s


    A little better expressed sorry for my bad inglish

  13. #13
    f793 eXtremousZ is offline
    MemberRank
    May 2013 Join Date
    Planet ShearLocation
    857Posts

    Re: [Release] Simple IP Ban

    Quote Originally Posted by MtHx62210 View Post
    Hello I have a question here is Ipban walks very well but here is for example when I me banns and when I am at stake I owe disconnect me from the game it do not disconnect me directly have you a solution

    Know how to expel you how a player who is at stake because for example I banns a player but if he does not disconnect completely from the game(set,play) this one can continue to play:s


    A little better expressed sorry for my bad inglish
    MtHx that can't be fixed. Say to them that they received Free GC and they have to restart their games. You can also kick players if you are Developer if you use the following command: "/kick", Just remember you can't kick players with space in their name. And if player is using different characters in name press Report button and copy the name press /kick namehere and you are done.
    I am also playing in your server, good luck with it! :)

  14. #14
    DarKGunZ Owner WooAf is offline
    MemberRank
    Dec 2007 Join Date
    CanadaLocation
    480Posts

    Re: [Release] Simple IP Ban

    Quote Originally Posted by MtHx62210 View Post
    Hello I have a question here is Ipban walks very well but here is for example when I me banns and when I am at stake I owe disconnect me from the game it do not disconnect me directly have you a solution

    Know how to expel you how a player who is at stake because for example I banns a player but if he does not disconnect completely from the game(set,play) this one can continue to play:s


    A little better expressed sorry for my bad inglish
    You can simply hook a in game command and make it check if the account is ip banned..

    Or you can just block the ip in your firewall..

    Sent from my Google Nexus

  15. #15
    Harro Syxn is offline
    MemberRank
    Mar 2013 Join Date
    767Posts

    Re: [Release] Simple IP Ban

    Thanks for sharing this :)



Page 1 of 3 123 LastLast

Advertisement