From 1451011e86dcbcaba2e43013ee86042ad27dc6b5 Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Fri, 21 Jul 2017 11:05:47 +0200 Subject: it accepts only 1 user --- lib/classes.py | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) (limited to 'lib/classes.py') diff --git a/lib/classes.py b/lib/classes.py index fc04e2d..1a1c876 100644 --- a/lib/classes.py +++ b/lib/classes.py @@ -2,9 +2,6 @@ import redis, socket, os from config import config as co r = redis.Redis(host=co['host'], port=co['port'], unix_socket_path=co['unix_socket_path'], db=co['db']) -s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) -s.connect(('8.8.8.8', 80)) -host = s.getsockname()[0] def clear(): """ @@ -15,16 +12,16 @@ def clear(): except: os.system('cls') -def userexist(name): - """ - lista is a list for the set called USERSNAME. check if name is in lista - """ - lista = r.zrange('usersname', 0, -1) - for i in lista: - if name == i.decode('utf-8'): - return True - else: - return False +# def userexist(name): +# """ +# lista is a list for the set called USERSNAME. check if name is in lista +# """ +# lista = r.zrange('usersname', 0, -1) +# for i in lista: +# if name == i.decode('utf-8'): +# return True +# else: +# return False class PersonalError(Exception): -- cgit v1.2.3-71-g8e6c