fix sql query for player associations
parent
929f4c7622
commit
286c26b6d0
8
data.lua
8
data.lua
|
@ -856,10 +856,10 @@ end
|
|||
|
||||
function data.get_player_associations(player_id)
|
||||
local code = [[
|
||||
SELECT assoc.ip ipint
|
||||
, assoc.asn asn
|
||||
, ip_status_log.id ip_status_id
|
||||
, asn_status_log.id asn_status_id
|
||||
SELECT assoc.ip ipint
|
||||
, assoc.asn asn
|
||||
, ip_status_log.status_id ip_status_id
|
||||
, asn_status_log.status_id asn_status_id
|
||||
FROM assoc
|
||||
JOIN player ON player.id == assoc.player_id
|
||||
JOIN ip ON ip.ip == assoc.ip
|
||||
|
|
|
@ -1,51 +0,0 @@
|
|||
TODO: turn this into proper documentation
|
||||
|
||||
check and reset tempban or tempblock, then...
|
||||
|
||||
new player logs in from a DEFAULT ip/network
|
||||
status = default
|
||||
new player logs in from a SUSPICIOUS ip/network
|
||||
if player is whitelisted: status = default
|
||||
else: status = unverified; alert mods
|
||||
new player logs in from a BLOCKED ip/network
|
||||
if player is whitelisted: let them in
|
||||
else: status is not changed (we should refuse to allow them to register the account)
|
||||
|
||||
old player logs in from a DEFAULT ip/network
|
||||
if status is banned boot them
|
||||
if status is suspicious, let them in BUT ALERT MODS
|
||||
else allow them in
|
||||
old player logs in from a SUSPICIOUS ip/network
|
||||
if player has never used that ip/network
|
||||
if the player is whitelisted let them in
|
||||
else refuse entry
|
||||
else
|
||||
if the player is whitelisted, let them in
|
||||
if the player is banned, as for default ip/net status
|
||||
else let them in, but alert mods
|
||||
old player logs in from a BLOCKED ip/network
|
||||
if the player is whitelisted, let them in
|
||||
else refuse entry
|
||||
|
||||
when status == default:
|
||||
account can be banned
|
||||
account can be whitelisted by admins
|
||||
account can be be marked suspicious
|
||||
account can be unverified (sent back to verification area)
|
||||
when status == unverified
|
||||
account can be verified (status -> default)
|
||||
account can be banned
|
||||
account can be whitelisted by admins (also lets them out of verification area)
|
||||
account can be marked suspicious (also lets them out of verification area)
|
||||
when status == banned
|
||||
account can be unbanned (status -> default | suspicious depending on network)
|
||||
account can be tempbanned (override previous behavior)
|
||||
when status == tempbanned
|
||||
account can be unbanned (status -> default | suspicious depending on network)
|
||||
account can be banned (override previous behavior)
|
||||
when status == whitelisted
|
||||
account can be unwhitelisted by admins (status -> default)
|
||||
account can be banned by admins
|
||||
account can be tempbanned by admins
|
||||
when status == suspicious
|
||||
as for default, mutatis mutandis
|
Loading…
Reference in New Issue