Skip to content

Commit

Permalink
Remove "guest" user penalty
Browse files Browse the repository at this point in the history
Much overdue as the mobile apps that justified this are long gone
closes #50, closes #17
  • Loading branch information
sfan5 committed Sep 5, 2021
1 parent 2f4ffde commit 84a40e4
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions server.py
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
import os, re, sys, json, time, socket
import os, sys, json, time, socket
from threading import Thread, RLock
from geolite2 import geolite2

Expand Down Expand Up @@ -357,13 +357,9 @@ def sort(self):
def server_points(server):
points = 0

# 1 per client, but only 1/8 per "guest" client
# 1 per client
if "clients_list" in server:
for name in server["clients_list"]:
if re.match(r"[A-Z][a-z]{3,}[1-9][0-9]{2,3}", name):
points += 1/8
else:
points += 1
points += len(server["clients_list"])
else:
# Old server (1/4 per client)
points = server["clients"] / 4
Expand Down

0 comments on commit 84a40e4

Please sign in to comment.