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

github.com/isida/4.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordenis-kostin <denis-kostin@pereulok.net.ru>2015-09-11 22:32:46 +0300
committerdenis-kostin <denis-kostin@pereulok.net.ru>2015-09-11 22:32:46 +0300
commit6b7254ff2895b7521e078f9271513ea32017c3b3 (patch)
treeaca65d86c7c4656b85091e9fdf3c822211ea912e
parenta7e7cdf37ad7b74be391225ebb3dc0916850abcf (diff)
fix: wot clans
-rw-r--r--plugins/wot.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/plugins/wot.py b/plugins/wot.py
index bfa5fe8..924d9e8 100644
--- a/plugins/wot.py
+++ b/plugins/wot.py
@@ -335,17 +335,16 @@ def wotclan(type, jid, nick, text):
if text:
try:
data = wot_api.fetch('wgn/clans/list/', 'search=%s' % text)
- claninfo = [i for i in data if i['abbreviation'] == text]
+ claninfo = [i for i in data if i['tag'] == text]
if claninfo:
claninfo = claninfo[0]
clid = claninfo['clan_id']
- owner = claninfo['owner_name']
created_at = claninfo['created_at']
- abbrev = claninfo['abbreviation']
- data = wot_api.fetch('wot/clan/info/', 'clan_id=%s' % clid)
+ abbrev = claninfo['tag']
+ data = wot_api.fetch('wgn/clans/info/', 'clan_id=%s' % clid)
claninfo2 = data[str(clid)]
msg = L('Name: %s [%s]','%s/%s'%(jid,nick)) % (claninfo2['name'], abbrev)
- msg += L('\nOwner: %s','%s/%s'%(jid,nick)) % owner
+ msg += L('\nOwner: %s','%s/%s'%(jid,nick)) % claninfo2['creator_name']
msg += L('\nCreated at: %s','%s/%s'%(jid,nick)) % time.ctime(created_at)
msg += L('\nCount of members: %s','%s/%s'%(jid,nick)) % claninfo2['members_count']
msg += L('\nMotto: %s','%s/%s'%(jid,nick)) % claninfo2['motto']