diff --git a/data.lua b/data.lua index 251281e..a65b65f 100644 --- a/data.lua +++ b/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 diff --git a/logic_notes.txt b/logic_notes.txt deleted file mode 100644 index 3a75b55..0000000 --- a/logic_notes.txt +++ /dev/null @@ -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