- updated code samples with latest feature-set
This commit is contained in:
Leslie Krause 2018-08-11 12:52:57 -04:00
parent fcdc6c1b71
commit 012fd491c3

View File

@ -5,8 +5,8 @@
##################################################################### #####################################################################
pass any pass any
if $addr eq "172.16.100.1" if $addr eq 172.16.100.1
if $addr eq "172.16.100.2" if $addr eq 172.16.100.2
if $name eq "admin" if $name eq "admin"
continue continue
@ -14,16 +14,16 @@ fail now
##################################################################### #####################################################################
# #
# block a range of IP addresses using wildcards # block access from a range of IP addresses
# #
##################################################################### #####################################################################
try "This subnet is blocked by the administrator." try "This subnet is blocked by the administrator."
fail any fail any
if $addr is /192.88.99.*/ if $addr is /192.88.99.6</a
if $addr is /203.0.113.*/ if $addr is /203.0.113.?/a
if $addr is /192.168.*.*/ if $addr is /192.168.12^14.?/a
continue continue
pass now pass now
@ -36,10 +36,7 @@ pass now
try "The account '$name' is not permitted to join this server." try "The account '$name' is not permitted to join this server."
pass any when $name in @whitelist.txt pass
if $name eq "admin"
when @whitelist.txt eq $name
continue
fall now fall now
@ -50,9 +47,8 @@ fall now
##################################################################### #####################################################################
try "The account '$name' is not permitted to join this server." try "The account '$name' is not permitted to join this server."
fail all
when @blacklist.txt eq $name when $name in @blacklist.txt fail
continue
pass now pass now
@ -74,9 +70,7 @@ fail now
try "Sorry, we do not accept all uppercase player names." try "Sorry, we do not accept all uppercase player names."
fail all when $name eq uc($name) fail
$name eq uc($name)
continue
pass now pass now
@ -89,8 +83,8 @@ pass now
try "Sorry, this player name is too long or too short." try "Sorry, this player name is too long or too short."
fail any fail any
$name->len() gt 20 if $name->len() gt 20
$name->len() lt 3 if $name->len() lt 3
continue continue
pass now pass now
@ -123,8 +117,8 @@ pass now
try "There are too many players online right now." try "There are too many players online right now."
fail all fail all
$is_new eq $true if $is_new eq $true
$cur_users gte $max_users->mul(0.8) if $cur_users gte $max_users->mul(0.8)
continue continue
pass now pass now
@ -138,8 +132,8 @@ pass now
try "Sorry, this acccount has been permanently restricted." try "Sorry, this acccount has been permanently restricted."
fail all fail all
$is_new eq $true if $is_new eq $true
when ("moderator","server","client","owner","player","system","operator","minetest") is $name if ("moderator","server","client","owner","player","system","operator","minetest") has $name
continue continue
pass now pass now
@ -169,7 +163,7 @@ try "Sorry, we are not accepting new players at this time."
fail now fail now
if $is_new eq $true if $is_new eq $true
when ("Sat","Sun") eq $clock->day() if $clock->day() in ("Sat","Sun")
continue continue
pass now pass now