[Release] Simple IP Ban

Joined
Dec 15, 2007
Messages
396
Reaction score
100
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:
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
 
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! :)
 
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
 
Is there any straightforward way to enable ban/kick of players with spaces in thier character name? Can the code be changed to work off of AccountID or CustomerID #s instead?
 
Back