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-08-08 16:51:53 +0400
committerAl Korgun <alkorgun@gmail.com>2013-08-08 16:51:53 +0400
commit925c5033bb5c78e73db2cd9aec34274df02b75dc (patch)
tree5e2f013adcbbb7dd8c147012e6af9670b6875ea7
parentb3306ccf9d026db030c822aeb6f33ebf4cefcdef (diff)
update for XEP-0184; fix of "config"
-rw-r--r--BlackSmith.py4
-rw-r--r--expansions/config/code.py17
-rw-r--r--expansions/sheriff/code.py38
-rw-r--r--librarys.zipbin99330 -> 99336 bytes
4 files changed, 30 insertions, 29 deletions
diff --git a/BlackSmith.py b/BlackSmith.py
index 8ae6f2c..46ed62a 100644
--- a/BlackSmith.py
+++ b/BlackSmith.py
@@ -273,7 +273,7 @@ ConDispFile = static % ("clients.ini")
ChatsFile = dynamic % ("chats.db")
ChatsFileBackup = dynamic % ("chats.cp")
-(BsMark, BsVer, BsRev) = (2, 47, 0)
+(BsMark, BsVer, BsRev) = (2, 48, 0)
if os.access(SvnCache, os.R_OK):
Cache = open(SvnCache).readlines()
@@ -1492,7 +1492,7 @@ def XmppMessageCB(disp, stanza):
if stype != Types[1]:
if (stanza.getTag(Types[14])):
answer = xmpp.Message(source)
- answer.setTag(Types[15], namespace = xmpp.NS_RECEIPTS)
+ answer.setTag(Types[15], namespace = xmpp.NS_RECEIPTS).setAttr("id", stanza.getID())
answer.setID(stanza.getID())
Sender(disp, answer)
stype = Types[0]
diff --git a/expansions/config/code.py b/expansions/config/code.py
index 496a3fa..7da6380 100644
--- a/expansions/config/code.py
+++ b/expansions/config/code.py
@@ -1,8 +1,8 @@
# coding: utf-8
# BlackSmith mark.2
-# exp_name = "config" # /code.py v.x7
-# Id: 19~6c
+# exp_name = "config" # /code.py v.x8
+# Id: 19~7c
# Code © (2011-2013) by WitcherGeralt [alkorgun@gmail.com]
class expansion_temp(expansion):
@@ -49,12 +49,13 @@ class expansion_temp(expansion):
for Title in ConfigDesc.keys():
for (Name, data) in ConfigDesc[Title].items():
GenCon.set(Title, Name, data)
- if Name not in self.ops[-2:]:
- data = eval(data)
- if Name == self.ops[0]:
- data *= 1024
- data = (32768 if (data and data <= 32768) else data)
- globals()[self.opsGeq[self.ops.index(Name)]] = data
+ if Name in self.ops:
+ if Name not in self.ops[-2:]:
+ data = eval(data)
+ if Name == self.ops[0]:
+ data *= 1024
+ data = (32768 if (data and data <= 32768) else data)
+ globals()[self.opsGeq[self.ops.index(Name)]] = data
cat_file(GenConFile, self.get_config(GenCon))
ls = []
for Name in ConfigDesc.values():
diff --git a/expansions/sheriff/code.py b/expansions/sheriff/code.py
index 1a03197..b104840 100644
--- a/expansions/sheriff/code.py
+++ b/expansions/sheriff/code.py
@@ -180,7 +180,7 @@ class expansion_temp(expansion):
answer = AnsBase[0]
Answer(answer, stype, source, disp)
- def spesial_kick(self, conf, nick, text):
+ def special_kick(self, conf, nick, text):
Chats[conf].kick(nick, "%s: %s" % (get_nick(conf), text))
raise iThr.ThrKill("exit")
@@ -227,15 +227,15 @@ class expansion_temp(expansion):
if (nick.strip()):
if len(nick) > ChatsAttrs[conf]["laws"]["lnick"]:
- self.spesial_kick(conf, nick, self.AnsBase[0] % (ChatsAttrs[conf]["laws"]["lnick"]))
+ self.special_kick(conf, nick, self.AnsBase[0] % (ChatsAttrs[conf]["laws"]["lnick"]))
if nick_checker(conf, nick):
- self.spesial_kick(conf, nick, self.AnsBase[1])
+ self.special_kick(conf, nick, self.AnsBase[1])
if ChatsAttrs[conf]["laws"]["space"]:
if len(nick) != len(nick.strip()):
- self.spesial_kick(conf, nick, self.AnsBase[2])
+ self.special_kick(conf, nick, self.AnsBase[2])
if ChatsAttrs[conf]["laws"]["obscene"]:
if self.obscene_checker(nick):
- self.spesial_kick(conf, nick, self.AnsBase[3])
+ self.special_kick(conf, nick, self.AnsBase[3])
def sheriff_set(self, stype, source, source_, access, loyalty, body, disp):
if access <= loyalty:
@@ -251,9 +251,9 @@ class expansion_temp(expansion):
raise iThr.ThrKill("exit")
else:
prisoner.setDevoice()
- self.spesial_kick(source[1], source[2], body)
+ self.special_kick(source[1], source[2], body)
else:
- self.spesial_kick(source[1], source[2], body)
+ self.special_kick(source[1], source[2], body)
else:
Answer(body, stype, source, disp); raise iThr.ThrKill("exit")
@@ -271,7 +271,7 @@ class expansion_temp(expansion):
if access <= loyalty[1]:
if prisoner:
prisoner.setDevoice()
- self.spesial_kick(source[1], source[2], self.AnsBase[4])
+ self.special_kick(source[1], source[2], self.AnsBase[4])
else:
Answer(self.AnsBase[4], stype, source, disp)
raise iThr.ThrKill("exit")
@@ -283,7 +283,7 @@ class expansion_temp(expansion):
Message(source[0], self.AnsBase[21], disp)
elif prisoner.vnumb.plus() >= 3:
prisoner.vnumb = itypes.Number()
- self.spesial_kick(source[1], source[2], self.AnsBase[22])
+ self.special_kick(source[1], source[2], self.AnsBase[22])
else:
Message(source[0], self.AnsBase[23], disp)
raise iThr.ThrKill("exit")
@@ -292,7 +292,7 @@ class expansion_temp(expansion):
if (list[-1] - list[0]) <= 6:
prisoner.msdates = [list.pop()]
prisoner.setDevoice()
- self.spesial_kick(source[1], source[2], self.AnsBase[15])
+ self.special_kick(source[1], source[2], self.AnsBase[15])
else:
prisoner.msdates.pop(0)
del list
@@ -419,7 +419,7 @@ class expansion_temp(expansion):
if len(list) >= 4:
if (list[-1] - list[0]) <= 10:
prisoner.prdates = [list.pop()]
- self.spesial_kick(conf, nick, self.AnsBase[13])
+ self.special_kick(conf, nick, self.AnsBase[13])
else:
prisoner.prdates.pop(0)
del list
@@ -427,13 +427,13 @@ class expansion_temp(expansion):
if status:
if ChatsAttrs[conf]["laws"]["tiser"]:
if self.tiser_checker(status):
- self.spesial_kick(conf, nick, self.AnsBase[4])
+ self.special_kick(conf, nick, self.AnsBase[4])
if ChatsAttrs[conf]["laws"]["obscene"]:
if self.obscene_checker(status):
- self.spesial_kick(conf, nick, self.AnsBase[8])
+ self.special_kick(conf, nick, self.AnsBase[8])
if ChatsAttrs[conf]["laws"]["prlen"]:
if len(status) > ChatsAttrs[conf]["laws"]["prlen"]:
- self.spesial_kick(conf, nick, self.AnsBase[9])
+ self.special_kick(conf, nick, self.AnsBase[9])
def sheriff_05eh(self, conf, nick, sbody, scode, disp):
if nick != get_nick(conf):
@@ -463,7 +463,7 @@ class expansion_temp(expansion):
if len(list) >= 4:
if (list[-1] - list[0]) <= 10:
prisoner.prdates = [list.pop()]
- self.spesial_kick(conf, nick, self.AnsBase[13])
+ self.special_kick(conf, nick, self.AnsBase[13])
else:
prisoner.prdates.pop(0)
@@ -489,7 +489,7 @@ class expansion_temp(expansion):
if len(list) >= 4:
if (list[-1] - list[0]) <= 10:
prisoner.prdates = [list.pop()]
- self.spesial_kick(conf, nick, self.AnsBase[13])
+ self.special_kick(conf, nick, self.AnsBase[13])
else:
prisoner.prdates.pop(0)
del list
@@ -497,13 +497,13 @@ class expansion_temp(expansion):
if status:
if ChatsAttrs[conf]["laws"]["tiser"]:
if self.tiser_checker(status):
- self.spesial_kick(conf, nick, self.AnsBase[4])
+ self.special_kick(conf, nick, self.AnsBase[4])
if ChatsAttrs[conf]["laws"]["obscene"]:
if self.obscene_checker(status):
- self.spesial_kick(conf, nick, self.AnsBase[8])
+ self.special_kick(conf, nick, self.AnsBase[8])
if ChatsAttrs[conf]["laws"]["prlen"]:
if len(status) > ChatsAttrs[conf]["laws"]["prlen"]:
- self.spesial_kick(conf, nick, self.AnsBase[9])
+ self.special_kick(conf, nick, self.AnsBase[9])
def sheriff_01si(self, conf):
self.Prison[conf] = {}
diff --git a/librarys.zip b/librarys.zip
index 75a4aed..06ae3ce 100644
--- a/librarys.zip
+++ b/librarys.zip
Binary files differ