cezarica 2 Posted July 2, 2015 (edited) Anyone know how can access the blacklist via Python? Кто-нибудь знает, как можно получить доступ к черный список с помощью Python? Edited July 2, 2015 by cezarica Quote Share this post Link to post Short link Share on other sites
Helkar 385 #280648 Posted July 4, 2015 not sure it's best way, but: import messenger.storage as storage usersStorage = storage.storage_getter('users') for user in usersStorage().all(): if 'muted' in user.getTags(): print user.getName() 2 Quote Share this post Link to post Short link Share on other sites
cezarica 2 #280783 Posted July 6, 2015 (edited) Thanks Helkar. usersStorage().all() seems to be empty. Any other way to get that list? Edit: The list is populated when LobbyView_populate is triggered. import messenger.storage as storage from gui.Scaleform.daapi.view.lobby.LobbyView import LobbyView def new_LobbyView_populate(current): old_LobbyView_populate(current) usersStorage = storage.storage_getter('users') for user in usersStorage().all(): if 'ignored' in user.getTags(): print user.getName() old_LobbyView_populate = LobbyView._populate LobbyView._populate = new_LobbyView_populate Same results I got with: from messenger.storage import _STORAGE from gui.Scaleform.daapi.view.lobby.LobbyView import LobbyView def new_LobbyView_populate(current): old_LobbyView_populate(current) for id in _STORAGE['users']._UsersStorage__contacts: user = _STORAGE['users'].getUser(id) if 'ignored' in user.getTags(): print user.getName() old_LobbyView_populate = LobbyView._populate LobbyView._populate = new_LobbyView_populate Any idea how to remove a player from the blacklist if got the id/name that I want to remove? Edited July 6, 2015 by cezarica Quote Share this post Link to post Short link Share on other sites
Helkar 385 #280880 Posted July 6, 2015 so it works after all? =) Quote Share this post Link to post Short link Share on other sites
cezarica 2 #280952 Posted July 7, 2015 (edited) Yes. As for removing an ignored user g_messengerEvents.users.onUserActionReceived(_ACTION_ID.IGNORED_REMOVED, user) will do that, but still get them in the blacklist as muted so my guess would have to use g_messengerEvents.users.onUserActionReceived(_ACTION_ID.MUTE_UNSET, user) too. Wish I had this knowledge a while back when had 200 idiots in my blacklist and had to remove them manually one by one. :D Edited July 7, 2015 by cezarica Quote Share this post Link to post Short link Share on other sites
Megagrob 5 #311165 Posted January 27, 2016 not sure it's best way, but: import messenger.storage as storage usersStorage = storage.storage_getter('users') for user in usersStorage().all(): if 'muted' in user.getTags(): print user.getName() А как получить этот же список в бою? При воспроизведении реплея этот код не получает данные. Quote Share this post Link to post Short link Share on other sites
Helkar 385 #311166 Posted January 27, 2016 А как получить этот же список в бою? При воспроизведении реплея этот код не получает данные.игра не подключается к серверу в реплее 1 Quote Share this post Link to post Short link Share on other sites
Megagrob 5 #311171 Posted January 27, 2016 (edited) игра не подключается к серверу в реплее Вот я баран, таки да, работает в реальных боях, не в реплеях. СПС Edited February 3, 2016 by Megagrob Quote Share this post Link to post Short link Share on other sites
RangerRU 8 #404986 Posted September 23, 2017 апну тему не получается через g_messengerEvents.users.onUserActionReceived(USER_ACTION_ID.IGNORED_REMOVED, user) и g_messengerEvents.users.onUserActionReceived(USER_ACTION_ID.MUTE_UNSET, user) черный список так и остается нетронутым (даже с учетом перезагрузки игры) Кто-нибдуь может подсказать как всё-таки очистить его "одним движением пера"? Quote Share this post Link to post Short link Share on other sites
ShuraBB 1,151 #405977 Posted October 3, 2017 В 23.09.2017 в 10:39, RangerRU сказал: Кто-нибдуь может подсказать как всё-таки очистить его "одним движением пера"? Одним не получится. Нужно городить велосипед удаляя в цикле по одному IDу да еще с задержкой в 2-3 секунды. 1 Quote Share this post Link to post Short link Share on other sites
RangerRU 8 #405990 Posted October 3, 2017 (edited) @ShuraBB Спасибо за Шикарная возможность!!! Можно узнать, команда на удаление одна/две идет в цикле? BigWorld.player().removeIgnored(dbID) и BigWorld.player().unsetMuted(dbID)? Edited October 3, 2017 by RangerRU Quote Share this post Link to post Short link Share on other sites
ShuraBB 1,151 #406016 Posted October 3, 2017 4 часа назад, RangerRU сказал: Можно узнать, команда на удаление одна/две идет в цикле? Я делал через ContactsManager().removeIgnored(Id) Он делает полное корректное удаление, возможно BigWorld.player().removeIgnored(dbID) ее-же и вызывает - не проверял :-) 1 Quote Share this post Link to post Short link Share on other sites