General > Developers Corner

Permanent bans to carry over

(1/1)

cyborgguy123:
I am working in a community and we do not want bans to carry over each server because they are different gamemodes. However the one exception is permanent bans.

How would I make it so only permanent bans (aka a ban time of 0) carry over.

We already have MySQL databases to carry out this function.

BlueNova:
Perhaps you could try using source bans and just port permanent bans to source bans. Would enforce them to all servers added.

JamminR:
You didn't mention how far along you were in your code ideas, so here's a very high level.
You'd have to disable ULib bans.
Pseudo logic
On a ban function,
if bantime > 0 then
    write sql <gamemode> ban table = banned_player, time
else
    write sql perm ban table = banned_player, 0
end

on connect hook
On connect, check player against gamemode banlist and perm ban list.

Navigation

[0] Message Index

Go to full version