upd: WoT plugin - added info about last visit
This commit is contained in:
@@ -1404,6 +1404,9 @@ Impossible to get tanks' statistics Невозможно получить ста
|
|||||||
- deerhead 2nd class - оленевод 2-го класса
|
- deerhead 2nd class - оленевод 2-го класса
|
||||||
- deerhead 1st class - оленевод 1-го класса
|
- deerhead 1st class - оленевод 1-го класса
|
||||||
- master deerhead - мастер-оленевод
|
- master deerhead - мастер-оленевод
|
||||||
|
\nLast seen: \nПоследний раз замечен:
|
||||||
|
%s\n- in battle: %s %s\n- в бою: %s
|
||||||
|
%s\n- online: %s %s\n- в сети: %s
|
||||||
Impossible to get statistics Невозможно получить статистику
|
Impossible to get statistics Невозможно получить статистику
|
||||||
Query error Ошибка запроса
|
Query error Ошибка запроса
|
||||||
Player not found Игрок не найден
|
Player not found Игрок не найден
|
||||||
@@ -1416,7 +1419,6 @@ Clan not found Клан не найден
|
|||||||
Impossible to get info Невозможно получить информацию
|
Impossible to get info Невозможно получить информацию
|
||||||
World of Tanks - info about user. Usage: wot [nick [tank]] World of Tanks - информация о пользователе. Использование: wot [ник [танк]]
|
World of Tanks - info about user. Usage: wot [nick [tank]] World of Tanks - информация о пользователе. Использование: wot [ник [танк]]
|
||||||
World of Tanks - info about clan. Usage: wotclan clan World of Tanks - информация о клане. Пример: wotclan клан
|
World of Tanks - info about clan. Usage: wotclan clan World of Tanks - информация о клане. Пример: wotclan клан
|
||||||
World of Tanks - info about offers. Usage: wotoffers [active|all] [real|prem|info] World of Tanks - информация о акциях. Пример: wotoffers [active|all] [real|prem|info]
|
|
||||||
|
|
||||||
# file: plugins/wtf.py
|
# file: plugins/wtf.py
|
||||||
I know that %s is %s Я знаю, что %s - %s
|
I know that %s is %s Я знаю, что %s - %s
|
||||||
@@ -1855,5 +1857,5 @@ API settings Настройки API
|
|||||||
World of Tanks settings Настройки плагина World of Tanks
|
World of Tanks settings Настройки плагина World of Tanks
|
||||||
|
|
||||||
# write locale file: ru.txt
|
# write locale file: ru.txt
|
||||||
# total: 1432
|
# total: 1434
|
||||||
# regenarated without mistakes!
|
# missed translations: 3
|
||||||
|
|||||||
@@ -1404,6 +1404,9 @@ Impossible to get tanks' statistics Неможливо отримати стат
|
|||||||
- deerhead 2nd class - оленевід 2-го класу
|
- deerhead 2nd class - оленевід 2-го класу
|
||||||
- deerhead 1st class - оленевід 1-го класу
|
- deerhead 1st class - оленевід 1-го класу
|
||||||
- master deerhead - майстер-оленевід
|
- master deerhead - майстер-оленевід
|
||||||
|
\nLast seen: \nОстанній раз помічений:
|
||||||
|
%s\n- in battle: %s %s\n- в бою: %s
|
||||||
|
%s\n- online: %s %s\n- в мережі: %s
|
||||||
Impossible to get statistics Неможливо отримати статистику
|
Impossible to get statistics Неможливо отримати статистику
|
||||||
Query error Помилка запиту
|
Query error Помилка запиту
|
||||||
Player not found Гравця не знайдено
|
Player not found Гравця не знайдено
|
||||||
@@ -1416,7 +1419,6 @@ Clan not found Клан не знайдено
|
|||||||
Impossible to get info Неможливо отримати інформацію
|
Impossible to get info Неможливо отримати інформацію
|
||||||
World of Tanks - info about user. Usage: wot [nick [tank]] World of Tanks - інформація про користувача. Використання: wot [нік [танк]]
|
World of Tanks - info about user. Usage: wot [nick [tank]] World of Tanks - інформація про користувача. Використання: wot [нік [танк]]
|
||||||
World of Tanks - info about clan. Usage: wotclan clan World of Tanks - інформація про клан. Приклад: wotclan клан
|
World of Tanks - info about clan. Usage: wotclan clan World of Tanks - інформація про клан. Приклад: wotclan клан
|
||||||
World of Tanks - info about offers. Usage: wotoffers [active|all] [real|prem|info] World of Tanks - інформація про акції. Приклад: wotoffers [active|all] [real|prem|info]
|
|
||||||
|
|
||||||
# file: plugins/wtf.py
|
# file: plugins/wtf.py
|
||||||
I know that %s is %s Я знаю, що %s - %s
|
I know that %s is %s Я знаю, що %s - %s
|
||||||
@@ -1855,5 +1857,5 @@ API settings Налаштування API
|
|||||||
World of Tanks settings Налаштування плагіна World of Tanks
|
World of Tanks settings Налаштування плагіна World of Tanks
|
||||||
|
|
||||||
# write locale file: ua.txt
|
# write locale file: ua.txt
|
||||||
# total: 1432
|
# total: 1434
|
||||||
# regenarated without mistakes!
|
# missed translations: 3
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ def wot(type, jid, nick, text):
|
|||||||
|
|
||||||
vdata = wot_api.fetch('wot/tanks/stats', 'account_id=%s' % player_id)
|
vdata = wot_api.fetch('wot/tanks/stats', 'account_id=%s' % player_id)
|
||||||
|
|
||||||
pdata = wot_api.fetch('wot/account/info', 'account_id=%s&fields=nickname,statistics,global_rating' % player_id)
|
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']
|
stat = pdata[player_id]['statistics']
|
||||||
|
|
||||||
claninfo = wot_api.fetch('wot/clan/membersinfo', 'member_id=%s' % player_id)
|
claninfo = wot_api.fetch('wot/clan/membersinfo', 'member_id=%s' % player_id)
|
||||||
@@ -114,7 +114,7 @@ def wot(type, jid, nick, text):
|
|||||||
msg = '%s: %s/%s' % (wotname, wins, battles)
|
msg = '%s: %s/%s' % (wotname, wins, battles)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
try:
|
if 1: #try:
|
||||||
win_percent = round(100.0 * wins / battles, 2)
|
win_percent = round(100.0 * wins / battles, 2)
|
||||||
msg = '%s: %s/%s (%s%%)' % (wotname, wins, battles, win_percent)
|
msg = '%s: %s/%s (%s%%)' % (wotname, wins, battles, win_percent)
|
||||||
|
|
||||||
@@ -219,9 +219,12 @@ def wot(type, jid, nick, text):
|
|||||||
msg += L(' - master deerhead','%s/%s'%(jid,nick))
|
msg += L(' - master deerhead','%s/%s'%(jid,nick))
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
msg += L('\nLast seen:','%s/%s'%(jid,nick))
|
||||||
except:
|
msg = L('%s\n- in battle: %s','%s/%s'%(jid,nick)) % (msg, datetime.datetime.fromtimestamp(pdata[player_id]['last_battle_time']))
|
||||||
msg = L('Impossible to get statistics','%s/%s'%(jid,nick))
|
msg = L('%s\n- online: %s','%s/%s'%(jid,nick)) % (msg, datetime.datetime.fromtimestamp(pdata[player_id]['logout_at']))
|
||||||
|
|
||||||
|
#except:
|
||||||
|
# msg = L('Impossible to get statistics','%s/%s'%(jid,nick))
|
||||||
elif not pdata['status']:
|
elif not pdata['status']:
|
||||||
msg = L('Query error','%s/%s'%(jid,nick))
|
msg = L('Query error','%s/%s'%(jid,nick))
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user