diff options
author | alkorgun@gmail.com <alkorgun@gmail.com@94c44753-77e5-68b8-8764-2ca2b8acb85e> | 2012-12-04 20:42:11 +0400 |
---|---|---|
committer | alkorgun@gmail.com <alkorgun@gmail.com@94c44753-77e5-68b8-8764-2ca2b8acb85e> | 2012-12-04 20:42:11 +0400 |
commit | 8d461a20a469bac34be83942fefc5e6673cb49f5 (patch) | |
tree | 75b0bf99a4aceefc3d658d5cddf535ceac5cf8b4 | |
parent | ec66b4cb7eb50ac9b339a2a9721257d5a90be4ca (diff) |
commit error
-rw-r--r-- | expansions/extra_control/code.py | 30 | ||||
-rw-r--r-- | expansions/sconf_attrs/prefix.en | 2 | ||||
-rw-r--r-- | expansions/sconf_attrs/prefix.ru | 4 | ||||
-rw-r--r-- | expansions/session_stats/code.py | 2 | ||||
-rw-r--r-- | expansions/wtf/code.py | 16 |
5 files changed, 27 insertions, 27 deletions
diff --git a/expansions/extra_control/code.py b/expansions/extra_control/code.py index ac38cdd..2f4acc6 100644 --- a/expansions/extra_control/code.py +++ b/expansions/extra_control/code.py @@ -58,14 +58,14 @@ class expansion_temp(expansion): else: conf = None if conf: - itype = (body.pop(0)).lower() - if itype in ("chat", "чат".decode("utf-8")): - type2 = Types[1] - elif itype in ("private", "приват".decode("utf-8")): - type2 = Types[0] + typ = (body.pop(0)).lower() + if typ in ("chat", "чат".decode("utf-8")): + stype_ = Types[1] + elif typ in ("private", "приват".decode("utf-8")): + stype_ = Types[0] else: - type2 = None - if type2: + stype_ = None + if stype_: cmd = (body.pop(0)).lower() if body: body = body[0] @@ -73,20 +73,20 @@ class expansion_temp(expansion): body = "" if 2048 >= len(body): if Cmds.has_key(cmd): - inst = Cmds[cmd] - if inst.isAvalable and inst.handler: + cmd = Cmds[cmd] + if cmd.isAvalable and cmd.handler: Info["cmd"].plus() - if type2 == Types[1]: + if stype_ == Types[1]: disp_ = Chats[conf].disp else: disp_ = get_disp(disp) - sThread("command", inst.handler, (inst.exp, type2, (source[0], conf, source[2]), body, disp_), inst.name) - inst.numb.plus() + sThread("command", cmd.handler, (cmd.exp, stype_, (source[0], conf, source[2]), body, disp_), cmd.name) + cmd.numb.plus() source = get_source(source[1], source[2]) - if source and source not in inst.desc: - inst.desc.append(source) + if source: + cmd.desc.add(source) else: - answer = AnsBase[19] % (inst.name) + answer = AnsBase[19] % (cmd.name) else: answer = AnsBase[6] else: diff --git a/expansions/sconf_attrs/prefix.en b/expansions/sconf_attrs/prefix.en index 5c7a2a8..214e7de 100644 --- a/expansions/sconf_attrs/prefix.en +++ b/expansions/sconf_attrs/prefix.en @@ -1,5 +1,5 @@ shows/sets (for owners only) command prefix (list: !, @ , #, ., *)
-prefix (symbol)
+prefix (symbol/del)
*/prefix
bot would show current prefix
*/prefix !
diff --git a/expansions/sconf_attrs/prefix.ru b/expansions/sconf_attrs/prefix.ru index 0e685cc..c1425a9 100644 --- a/expansions/sconf_attrs/prefix.ru +++ b/expansions/sconf_attrs/prefix.ru @@ -1,8 +1,8 @@ показывает/устанавливает (только для овнеров) командный префикс (список: !, @ , #, ., *)
-префикс (символ)
+префикс (символ/убрать)
*/префикс
покажет текущий префикс
*/префикс !
бот установит префикс - "!"
-*/префикс удалить
+*/префикс убрать
бот будет выполнять команды без префикса
\ No newline at end of file diff --git a/expansions/session_stats/code.py b/expansions/session_stats/code.py index d1d9a26..f9a04a1 100644 --- a/expansions/session_stats/code.py +++ b/expansions/session_stats/code.py @@ -76,7 +76,7 @@ class expansion_temp(expansion): answer = AnsBase[6] else: ls = [] - for cmd in Cmds.values(): + for cmd in Cmds.itervalues(): used = cmd.numb._int() if used: ls.append((used, len(cmd.desc), cmd.name)) diff --git a/expansions/wtf/code.py b/expansions/wtf/code.py index 55a199a..9e733bf 100644 --- a/expansions/wtf/code.py +++ b/expansions/wtf/code.py @@ -1,8 +1,8 @@ # coding: utf-8 # BlackSmith mark.2 -# exp_name = "wtf" # /code.py v.x2 -# Id: 28~2c +# exp_name = "wtf" # /code.py v.x3 +# Id: 28~23 # Code © (2012) by WitcherGeralt [alkorgun@gmail.com] class expansion_temp(expansion): @@ -23,13 +23,13 @@ class expansion_temp(expansion): db("select name from wtf order by name") defs = db.fetchall() if defs: - ls.append(self.AnsBase[0] % (len(defs), enumerated_list([name[0].capitalize() for name in defs]))) + ls.append(self.AnsBase[0] % (len(defs), enumerated_list([name[0].title() for name in defs]))) if Chats.has_key(source[1]): with database(cefile(chat_file(source[1], self.ChatBase))) as db: db("select name from wtf order by name") defs = db.fetchall() if defs: - ls.append(self.AnsBase[1] % (len(defs), source[1], enumerated_list([name[0].capitalize() for name in defs]))) + ls.append(self.AnsBase[1] % (len(defs), source[1], enumerated_list([name[0].title() for name in defs]))) if ls: answer = self.AnsBase[-1] + str.join(chr(10)*2, ls) else: @@ -46,7 +46,7 @@ class expansion_temp(expansion): data = data.lower() numb = data.count(body) if numb or body in name or name in body: - ls.append(self.AnsBase[3] % (name.capitalize(), numb)) + ls.append(self.AnsBase[3] % (name.title(), numb)) if Chats.has_key(source[1]): with database(cefile(chat_file(source[1], self.ChatBase))) as db: db("select name, data from wtf order by name") @@ -56,7 +56,7 @@ class expansion_temp(expansion): data = data.lower() numb = data.count(body) if numb or body in name or name in body: - ls.append(self.AnsBase[3] % (name.capitalize(), numb)) + ls.append(self.AnsBase[3] % (name.title(), numb)) if ls: answer = self.AnsBase[-1] + enumerated_list(ls) else: @@ -69,14 +69,14 @@ class expansion_temp(expansion): desc = db.fetchone() if desc: name, data, nick, date = desc - answer = self.AnsBase[5] % (name.capitalize(), data, nick, date) + answer = self.AnsBase[5] % (name.title(), data, nick, date) if Chats.has_key(source[1]) and not answer: with database(cefile(chat_file(source[1], self.ChatBase))) as db: db("select * from wtf where name=?", (name,)) desc = db.fetchone() if desc: name, data, nick, date = desc - answer = self.AnsBase[5] % (name.capitalize(), data, nick, date) + answer = self.AnsBase[5] % (name.title(), data, nick, date) if not answer: answer = self.AnsBase[6] % (name) else: |