diff --git a/superTornado.py b/superTornado.py index f90e8f8..92ccf54 100644 --- a/superTornado.py +++ b/superTornado.py @@ -159,21 +159,21 @@ class WSocketHandler(BaseHandler,tornado.websocket.WebSocketHandler): if iden != "IllegalUser": log.printL("->"+iden + " : Authorized user connection : "+self.request.remote_ip,lvl.INFO) if blind == True: - authorized + 1 + GlobalVars.authorized + 1 log.printL('->Send audio alarm authorized user',lvl.INFO) self.send_signal_house('maison.request("GET", "micom/say.php?source=toto&text=Connection%20a%20la%20camera%20autorisee")') else: - authorized + 1 + GlobalVars.authorized + 1 log.printL('->Send visual alarm authorized user',lvl.INFO) self.send_signal_house('maison.request("GET", "micom/lamp.php?room=salon1&order=1")') else : log.printL("->"+iden + ": Unauthorized user connection : " + self.request.remote_ip,lvl.WARNING) if blind == True: - unauthorized + 1 + GlobalVars.unauthorized + 1 log.printL('->Send audio alarm unauthorized user',lvl.WARNING) self.send_signal_house('maison.request("GET", "micom/say.php?source=toto&text=Connection%20a%20la%20camera%20non%20autorisee")') else: - unauthorized + 1 + GlobalVars.unauthorized + 1 log.printL('->Send visual alarm unauthorized user',lvl.WARNING) self.send_signal_house('maison.request("GET", "micom/lamp.php?room=salon1&order=1")') self.send_image() @@ -201,11 +201,11 @@ class WSocketHandler(BaseHandler,tornado.websocket.WebSocketHandler): log.printL("->"+iden +" : Unauthorized User Deconnection : "+self.request.remote_ip,lvl.WARNING) if blind == True: - if (unauthorized == 0) and (authorized == 0): + if (GlobalVars.unauthorized == 0) and (authorized == 0): log.printL('->Send Audio Alarm Deconnection User', lvl.INFO) self.send_signal_house('maison.request("GET", "micom/say.php?source=toto&text=Connection%20a%20la%20camera%20rompue")') else: - if (unauthorized == 0) and (authorized == 0): + if (GlobalVars.unauthorized == 0) and (authorized == 0): log.printL('->Send Visual Alarm Deconnection User ...',lvl.INFO) self.send_signal_house('maison.request("GET", "micom/lamp.php?room=salon1&order=0")')