modifié: superTornado.py
This commit is contained in:
parent
380bef6a1d
commit
f1e370ab1a
@ -115,24 +115,8 @@ class WSocketHandler(BaseHandler,tornado.websocket.WebSocketHandler):
|
|||||||
|
|
||||||
def on_close(self):
|
def on_close(self):
|
||||||
print "->Websocket closed"
|
print "->Websocket closed"
|
||||||
if not self.current_user :
|
dc = httplib.HTTPConnection("127.0.0.1", 80)
|
||||||
iden="IllegalUser"
|
dc.request("POST", "/disconnection")
|
||||||
ficLog.enregDansLog(iden,"Unauthorized user deconnection","IP TO DO")
|
|
||||||
else :
|
|
||||||
iden = self.current_user
|
|
||||||
ficLog.enregDansLog(iden,"Authorized user deconnection","IP TO DO")
|
|
||||||
|
|
||||||
|
|
||||||
if confAveug == True:
|
|
||||||
print '->Send audio alarm deconnection user'
|
|
||||||
print 'maison.request("GET", "micom/say.php?source=toto&text=Connection%20a%20la%20camera%20rompue")'
|
|
||||||
else:
|
|
||||||
print '->Send visual alarm deconnection user'
|
|
||||||
print 'maison.request("GET", "micom/lamp.php?room=salon1&order=0")'
|
|
||||||
print"->"+iden+" Deconnection"
|
|
||||||
|
|
||||||
self.clear_cookie("user")
|
|
||||||
self.redirect("/")
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user