From 31cabab3d567558711665bd3dca1ce7d7dac37ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Volkan=20=C5=9Eahin?= Date: Mon, 27 Jun 2016 16:32:24 +0300 Subject: [PATCH] commander updated to new login command --- opt/ahenk/base/agreement/agreement.py | 0 opt/ahenk/base/agreement/ask.py | 0 opt/ahenk/base/command/commander.py | 10 +++++++++- 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 opt/ahenk/base/agreement/agreement.py create mode 100644 opt/ahenk/base/agreement/ask.py diff --git a/opt/ahenk/base/agreement/agreement.py b/opt/ahenk/base/agreement/agreement.py new file mode 100644 index 0000000..e69de29 diff --git a/opt/ahenk/base/agreement/ask.py b/opt/ahenk/base/agreement/ask.py new file mode 100644 index 0000000..e69de29 diff --git a/opt/ahenk/base/command/commander.py b/opt/ahenk/base/command/commander.py index da85512..5abf8be 100644 --- a/opt/ahenk/base/command/commander.py +++ b/opt/ahenk/base/command/commander.py @@ -5,6 +5,7 @@ import os import queue as Queue import threading +from base.Scope import Scope from base.command.fifo import Fifo from base.model.enum.ContentType import ContentType from base.model.enum.MessageCode import MessageCode @@ -29,7 +30,14 @@ class Commander(object): self.clean() return False - elif (params[1] == 'login' or params[1] == 'logout') and len(params) == 3: + elif params[1] == 'login' and len(params) == 7: + print('{1} {0}ing'.format(str(params[1]), str(params[2]))) + data['event'] = params[1] + data['username'] = params[2] + data['desktop'] = params[4] + data['display'] = params[6] + + elif params[1] == 'logout' and len(params) == 3: print('{1} {0}ing'.format(str(params[1]), str(params[2]))) data['event'] = params[1] data['username'] = params[2]