Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/alkorgun/blacksmith-2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAl Korgun <alkorgun@gmail.com>2013-01-14 20:11:22 +0400
committerAl Korgun <alkorgun@gmail.com>2013-01-14 20:11:22 +0400
commit9f4e686fe1c1a68743e4693219ed7057a9fb0f33 (patch)
treedb2044b496057d5c00b7a7a19b0edafcdac3d167
parentd54bf9c349c0602f2d981b2dbc67f7bbad6fa2cb (diff)
expansion "update" added to branches; "turbo" fixed
-rw-r--r--expansions/extra_control/code.py42
1 files changed, 22 insertions, 20 deletions
diff --git a/expansions/extra_control/code.py b/expansions/extra_control/code.py
index 5c6138f..5185ab1 100644
--- a/expansions/extra_control/code.py
+++ b/expansions/extra_control/code.py
@@ -1,9 +1,9 @@
# coding: utf-8
# BlackSmith mark.2
-# exp_name = "extra_control" # /code.py v.x10
-# Id: 01~8c
-# Code © (2009-2012) by WitcherGeralt [alkorgun@gmail.com]
+# exp_name = "extra_control" # /code.py v.x11
+# Id: 01~9c
+# Code © (2009-2013) by WitcherGeralt [alkorgun@gmail.com]
class expansion_temp(expansion):
@@ -15,25 +15,27 @@ class expansion_temp(expansion):
def command_turbo(self, stype, source, body, disp):
if body:
if self.sep in body:
- ls = body.split(self.sep)
- lslen = len(ls) - 1
- if lslen < 4 or enough_access(source[1], source[2], 7):
- for numb, body in enumerate(ls):
- body = body.strip()
- body = body.split(None, 1)
- cmd = (body.pop(0)).lower()
- if Cmds.has_key(cmd):
- if body:
- body = body[0]
+ ls = [body.strip() for body in body.split(self.sep)]
+ if all(ls):
+ lslen = len(ls) - 1
+ if lslen < 4 or enough_access(source[1], source[2], 7):
+ for numb, body in enumerate(ls):
+ body = body.split(None, 1)
+ cmd = (body.pop(0)).lower()
+ if Cmds.has_key(cmd):
+ if body:
+ body = body[0]
+ else:
+ body = ""
+ Cmds[cmd].execute(stype, source, body, disp)
+ if numb not in (0, lslen):
+ sleep(2)
else:
- body = ""
- Cmds[cmd].execute(stype, source, body, disp)
- if numb not in (0, lslen):
- sleep(2)
- else:
- answer = AnsBase[6]
+ answer = AnsBase[6]
+ else:
+ answer = AnsBase[10]
else:
- answer = AnsBase[10]
+ answer = AnsBase[2]
else:
answer = AnsBase[2]
else: