diff options
author | Dico200 <dico.karssiens@gmail.com> | 2015-03-19 22:02:07 +0100 |
---|---|---|
committer | Dico200 <dico.karssiens@gmail.com> | 2015-03-19 22:02:07 +0100 |
commit | d993cc223ae4cc528def3e249d76b904e3c52f0e (patch) | |
tree | fc2892f677d13418e9a95c1514685d3fa93e58de /adminchat.py | |
parent | 40fa9c0692ece6c7230889546122876a4aa36255 (diff) |
Changed AC from toggle or , fixes #16
This solution to log any AC isn't very optimised as it will check for
permission twice. Any fix for this?
Anyways it now runs /ac <msg> from the player every time.
Diffstat (limited to 'adminchat.py')
-rw-r--r-- | adminchat.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/adminchat.py b/adminchat.py index cb4c36a..a90bbf8 100644 --- a/adminchat.py +++ b/adminchat.py @@ -48,8 +48,9 @@ def on_chat(event): msg = event.getMessage() if sender.hasPermission(ac_permission) and not event.isCancelled(): if msg[:len(ac_key)] == ac_key: - adminchat(sender, msg[1:]) + #This solution to log any AC isn't very optimised as it will check for permission twice. Any fix for this? + runas(sender, "ac " + msg[1:]) event.setCancelled(True) elif sender.getName() in ac_toggle_list: - adminchat(sender, msg) + runas(sender, "ac " + msg) event.setCancelled(True) |