Scripting/Squirrel/Functions/IsIPBanned: Difference between revisions
Jump to navigation
Jump to search
This wiki is using an old backup from 2020
Some information may be old/missing
No edit summary |
No edit summary |
||
(2 intermediate revisions by one other user not shown) | |||
Line 32: | Line 32: | ||
</source> | </source> | ||
== Notes == | === Notes === | ||
Call [[onPlayerCommand]] were used in this example. More info about them in the corresponding pages. | |||
== Related Functions == | == Related Functions == | ||
{{Scripting/Squirrel/Functions/Administrative_Functions}} | {{Scripting/Squirrel/Functions/Administrative_Functions}} | ||
[[Category:Scripting/Squirrel/Functions/Administrative_Functions]] |
Latest revision as of 17:58, 30 January 2017
This function will check if an IP is banned from the server.
Syntax
IsIPBanned( ip )
Arguments
- string ip - The IP to be checked
Return value
- bool isbanned - true or false
Example
function onPlayerCommand( player, command, arguments )
{
if (cmd == "checkip")
{
if(!IsIPBanned(text) == true)
{
ClientMessage("Provided IP '" + text + "' was not banned previously",player,255,255,255);
}
else
{
ClientMessage("Provided IP '" + text + "' is banned.",player,255,255,255);
}
}
return 1;
}
Notes
Call onPlayerCommand were used in this example. More info about them in the corresponding pages.