From 6b7254ff2895b7521e078f9271513ea32017c3b3 Mon Sep 17 00:00:00 2001 From: denis-kostin Date: Fri, 11 Sep 2015 23:32:46 +0400 Subject: fix: wot clans --- plugins/wot.py | 9 ++++----- 1 file 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'] -- cgit v1.2.3