Skip to content

BlockIpAddress and UnBlockIpAddress #25

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Disinterpreter opened this issue Jun 14, 2020 · 1 comment
Open

BlockIpAddress and UnBlockIpAddress #25

Disinterpreter opened this issue Jun 14, 2020 · 1 comment
Labels
compatibility Compatibility with latest version of SAMP depends on blue The feature might depend on MTA:SA source code function SAMP functions

Comments

@Disinterpreter
Copy link
Member

Disinterpreter commented Jun 14, 2020

Function name
BlockIpAddress(ip_address[], timems)
UnBlockIpAddress(ip_address[])

ip_address The IP to block.
timems The time (in milliseconds) that the connection will be blocked for. 0 can be used for an indefinite block.

Describe the function
Blocks an IP address from further communication with the server for a set amount of time (with wildcards allowed). Players trying to connect to the server with a blocked IP address will receive the generic "You are banned from this server." message. Players that are online on the specified IP before the block will timeout after specific amount of seconds and, upon reconnect, will receive the same message. Effect takes place only when server is running (it is not persistent).

Equivalent in MTA
https://wiki.multitheftauto.com/wiki/AddBan
https://wiki.multitheftauto.com/wiki/RemoveBan

But there is a problem.

Blocks an IP address from further communication with the server for a set amount of time (with wildcards allowed).

Additional information
BlockIpAddress
UnBlockIpAddress

@Disinterpreter Disinterpreter added compatibility Compatibility with latest version of SAMP function SAMP functions labels Jun 14, 2020
@Disinterpreter
Copy link
Member Author

Disinterpreter commented Jun 22, 2020

Blocks an IP address from further communication with the server for a set amount of time (with wildcards allowed).

Need to rewrite it to AMX
https://github.com/hamishforbes/lua-resty-iputils/blob/master/lib/resty/iputils.lua

But it will a long operation for big subnets. I think I will set the label 'depends on blue'

@Disinterpreter Disinterpreter added the depends on blue The feature might depend on MTA:SA source code label Jun 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compatibility Compatibility with latest version of SAMP depends on blue The feature might depend on MTA:SA source code function SAMP functions
Projects
None yet
Development

No branches or pull requests

1 participant