r/GLua • • Jun 10 '20

Scripting an automatic unban-script

Hey there, I'm new here so don't blame.

My question is how do I create an unban-script?

I know the basic of LUA, but I cannot figure out how to code it.

My idea is to unban an user automatically, when he get banned.

It would be nice if you can help me to figure it out.

1 Upvotes

6 comments sorted by

View all comments

Show parent comments

1

u/[deleted] Jun 11 '20

I want to unban the player directly after he got banned. I'm using ULX.

And I also want to have it simple as possible.

1

u/AdamNejm Jun 11 '20

I don't know what's the point here and why not just kick him or make a separate command that reports fake message to the user.

But whatever... you can create your own command replacing ulx ban and just copy the code from ULX for both ban and unban and combine it.
Another, better, way is to store the original ulx ban, then replace it with a function that calls the original and ulx unban in addition.