modifié: superTornado.py
This commit is contained in:
parent
dba3859ba8
commit
a4d820c3dc
@ -159,21 +159,21 @@ class WSocketHandler(BaseHandler,tornado.websocket.WebSocketHandler):
|
|||||||
if iden != "IllegalUser":
|
if iden != "IllegalUser":
|
||||||
log.printL("->"+iden + " : Authorized user connection : "+self.request.remote_ip,lvl.INFO)
|
log.printL("->"+iden + " : Authorized user connection : "+self.request.remote_ip,lvl.INFO)
|
||||||
if blind == True:
|
if blind == True:
|
||||||
authorized + 1
|
GlobalVars.authorized + 1
|
||||||
log.printL('->Send audio alarm authorized user',lvl.INFO)
|
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")')
|
self.send_signal_house('maison.request("GET", "micom/say.php?source=toto&text=Connection%20a%20la%20camera%20autorisee")')
|
||||||
else:
|
else:
|
||||||
authorized + 1
|
GlobalVars.authorized + 1
|
||||||
log.printL('->Send visual alarm authorized user',lvl.INFO)
|
log.printL('->Send visual alarm authorized user',lvl.INFO)
|
||||||
self.send_signal_house('maison.request("GET", "micom/lamp.php?room=salon1&order=1")')
|
self.send_signal_house('maison.request("GET", "micom/lamp.php?room=salon1&order=1")')
|
||||||
else :
|
else :
|
||||||
log.printL("->"+iden + ": Unauthorized user connection : " + self.request.remote_ip,lvl.WARNING)
|
log.printL("->"+iden + ": Unauthorized user connection : " + self.request.remote_ip,lvl.WARNING)
|
||||||
if blind == True:
|
if blind == True:
|
||||||
unauthorized + 1
|
GlobalVars.unauthorized + 1
|
||||||
log.printL('->Send audio alarm unauthorized user',lvl.WARNING)
|
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")')
|
self.send_signal_house('maison.request("GET", "micom/say.php?source=toto&text=Connection%20a%20la%20camera%20non%20autorisee")')
|
||||||
else:
|
else:
|
||||||
unauthorized + 1
|
GlobalVars.unauthorized + 1
|
||||||
log.printL('->Send visual alarm unauthorized user',lvl.WARNING)
|
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_signal_house('maison.request("GET", "micom/lamp.php?room=salon1&order=1")')
|
||||||
self.send_image()
|
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)
|
log.printL("->"+iden +" : Unauthorized User Deconnection : "+self.request.remote_ip,lvl.WARNING)
|
||||||
|
|
||||||
if blind == True:
|
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)
|
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")')
|
self.send_signal_house('maison.request("GET", "micom/say.php?source=toto&text=Connection%20a%20la%20camera%20rompue")')
|
||||||
else:
|
else:
|
||||||
if (unauthorized == 0) and (authorized == 0):
|
if (GlobalVars.unauthorized == 0) and (authorized == 0):
|
||||||
log.printL('->Send Visual Alarm Deconnection User ...',lvl.INFO)
|
log.printL('->Send Visual Alarm Deconnection User ...',lvl.INFO)
|
||||||
self.send_signal_house('maison.request("GET", "micom/lamp.php?room=salon1&order=0")')
|
self.send_signal_house('maison.request("GET", "micom/lamp.php?room=salon1&order=0")')
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user