mirror of
https://github.com/Pardus-LiderAhenk/ahenk
synced 2024-11-22 09:42:15 +03:00
redundant parameters removed
This commit is contained in:
parent
5e91ed708f
commit
1c0f5206fa
1 changed files with 3 additions and 3 deletions
|
@ -25,7 +25,7 @@ class Commander(object):
|
||||||
def set_event(self, *args):
|
def set_event(self, *args):
|
||||||
|
|
||||||
if args is None or len(args) < 1:
|
if args is None or len(args) < 1:
|
||||||
print('ERR')
|
print('Lack of arguments')
|
||||||
|
|
||||||
params = args[0]
|
params = args[0]
|
||||||
data = dict()
|
data = dict()
|
||||||
|
@ -39,14 +39,14 @@ class Commander(object):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
elif len(params) == 5 and params[1] == 'login':
|
elif len(params) == 5 and params[1] == 'login':
|
||||||
print('{1} {0}ing'.format(str(params[1]), str(params[2])))
|
print('{0} logging in'.format(str(params[2])))
|
||||||
data['event'] = params[1]
|
data['event'] = params[1]
|
||||||
data['username'] = params[2]
|
data['username'] = params[2]
|
||||||
data['desktop'] = params[3]
|
data['desktop'] = params[3]
|
||||||
data['display'] = params[4]
|
data['display'] = params[4]
|
||||||
|
|
||||||
elif len(params) == 3 and params[1] == 'logout':
|
elif len(params) == 3 and params[1] == 'logout':
|
||||||
print('{1} {0}ing'.format(str(params[1]), str(params[2])))
|
print('{0} logging out'.format(str(params[2])))
|
||||||
data['event'] = params[1]
|
data['event'] = params[1]
|
||||||
data['username'] = params[2]
|
data['username'] = params[2]
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue