def roomStatus(self): if not public.keyExists('flush'): print('flush') public.setRedis('flush', True, expire=8, forever=False) self.flush() if public.keyExists('roomStatus'): return eval(public.getRedis('roomStatus')) else: return {}
def today(self, status): public.setRedis('today', status, forever=True)
def tomorrow(self, status): public.setRedis('tomorrow', status, forever=True)
def me(self, status): public.setRedis('me', status, forever=True)
def isRed(self, status): public.setRedis('isRed', status, forever=True)
def title(self, mess): public.setRedis('title', mess, forever=True)
def message(self, mess): public.setRedis('close_mess', mess, forever=True)
def detect(self, status): public.setRedis('detect', status, forever=True)
def mon(self, status): public.setRedis('mon', status, forever=True)
def _users(self, u): if type(u) is not dict: raise TypeError public.setRedis('users', u, forever=True)
def roomStatus(self, value): if type(value) is not dict: raise TypeError public.setRedis('roomStatus', value, forever=True)
def _usersOnRunning(self, value): if type(value) is not dict: raise TypeError else: public.setRedis('_usersOnRunning', value, forever=True)
def __init__(self): self.monitor = Monitor() if public.keyExists('error'): self.monitor.deleteMon() public.setRedis('error', True, expire=100, forever=False) self.sleeping = 2