sqlite ban
#1

Hello,

I want to introduce a range ban in a table of sqlite, i tried 123.456.789.1** However, it don't take in consideration that ** should be random numbers for a range banned.

How could i do ?

Thanks
Reply
#2

In ban cmd use
pawn Код:
for(new i = strlen(ip)-1; i > -1; i--)
    if(ip[i] == '*')
        ip[i] = '%';
then in OnPlayerConnect
pawn Код:
"SELECT * FROM `range_bans` WHERE '%s' LIKE ip LIMIT 1",GetIP(playerid)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)