@@ -75,12 +75,12 @@ def wot(type, jid, nick, text):
|
||||
pdata = wot_api.fetch('wot/account/info', 'account_id=%s&fields=nickname,statistics,global_rating,last_battle_time,logout_at' % player_id)
|
||||
stat = pdata[player_id]['statistics']
|
||||
|
||||
claninfo = wot_api.fetch('wot/clan/membersinfo', 'member_id=%s' % player_id)
|
||||
claninfo = wot_api.fetch('wgn/clans/membersinfo', 'account_id=%s' % player_id)
|
||||
|
||||
if claninfo[player_id]:
|
||||
clan_id = str(claninfo[player_id]['clan_id'])
|
||||
cdata = wot_api.fetch('wot/clan/info', 'clan_id=%s&fields=abbreviation' % clan_id)
|
||||
cname = cdata[clan_id]['abbreviation']
|
||||
clan_id = str(claninfo[player_id]['clan']['clan_id'])
|
||||
cdata = wot_api.fetch('wgn/clans/info', 'clan_id=%s&fields=tag' % clan_id)
|
||||
cname = cdata[clan_id]['tag']
|
||||
except:
|
||||
pdata = None
|
||||
|
||||
@@ -334,18 +334,17 @@ def wotclan(type, jid, nick, text):
|
||||
text = text.strip().upper()
|
||||
if text:
|
||||
try:
|
||||
data = wot_api.fetch('wot/clan/list/', 'search=%s' % text)
|
||||
claninfo = [i for i in data if i['abbreviation'] == text]
|
||||
data = wot_api.fetch('wgn/clans/list/', 'search=%s' % 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']
|
||||
|
||||
Reference in New Issue
Block a user