Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[LINUX ONLY] Ban the ip from the Server by Iptables
This is just a sample and only works on Linux,keep that in mind. If you get the idea, you can improve it.

function _gban(id,txt)
if txt:sub(1,5)=="!gban" then
        if player(id,"usgn") == 32376 then --Change 32376 with your USGN Id
            t = tonumber(txt:sub(7,8))
            if tonumber(t) == nil then return 1 end --if id is not stated then stop
            if not player(t,"exists") then return 1 end --if stated id does not exist in game
os.execute("iptables -A INPUT -s "..player(t,"ip").." -j DROP") --drop that ip from the server, won't be able to see or join the sv
            return 1
[Image: bcy.jpg]

- United we stand, divided we fall. -

Possibly Related Threads…
Thread Author Replies Views Last Post
Bug Blocking Radio Menus by Server-side BcY 2 1,197 16-08-2018, 07:53 PM
Last Post: BcY

Forum Jump:

Users browsing this thread: 1 Guest(s)