summaryrefslogtreecommitdiff
path: root/security.py
diff options
context:
space:
mode:
Diffstat (limited to 'security.py')
-rw-r--r--security.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/security.py b/security.py
index 59a3efc..112f636 100644
--- a/security.py
+++ b/security.py
@@ -84,6 +84,17 @@ def unban_ip(ip):
stdout("%s is not banned." % (ip))
return
+def get_score(proto):
+ if (proto == PACKET_REGX):
+ return 2
+ elif proto == PACKET_NACK:
+ return 5
+ elif proto == PACKET_ACK:
+ return 0
+ else
+ stdout("\"%s\" is not a valid packet reply code" % str(proto))
+ return 0
+
def score(conn, score):
#print("Score request: %d" % score)
conn.MS_score += score