cezarica Posted July 2, 2015 Share Posted July 2, 2015 (edited) Anyone know how can access the blacklist via Python? Кто-нибудь знает, как можно получить доступ к черный список с помощью Python? Edited July 2, 2015 by cezarica @ Quote Link to comment Short link Share on other sites More sharing options...
Helkar Posted July 4, 2015 Share 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 Link to comment Short link Share on other sites More sharing options...
cezarica Posted July 6, 2015 Author Share 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 Link to comment Short link Share on other sites More sharing options...
Helkar Posted July 6, 2015 Share Posted July 6, 2015 so it works after all? =) @ Quote Link to comment Short link Share on other sites More sharing options...
cezarica Posted July 7, 2015 Author Share 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 Link to comment Short link Share on other sites More sharing options...
Megagrob Posted January 27, 2016 Share 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 Link to comment Short link Share on other sites More sharing options...
Helkar Posted January 27, 2016 Share Posted January 27, 2016 А как получить этот же список в бою? При воспроизведении реплея этот код не получает данные.игра не подключается к серверу в реплее 1 @ Quote Link to comment Short link Share on other sites More sharing options...
Megagrob Posted January 27, 2016 Share Posted January 27, 2016 (edited) игра не подключается к серверу в реплее Вот я баран, таки да, работает в реальных боях, не в реплеях. СПС Edited February 3, 2016 by Megagrob @ Quote Link to comment Short link Share on other sites More sharing options...
RangerRU Posted September 23, 2017 Share 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 Link to comment Short link Share on other sites More sharing options...
ShuraBB Posted October 3, 2017 Share Posted October 3, 2017 В 23.09.2017 в 10:39, RangerRU сказал: Кто-нибдуь может подсказать как всё-таки очистить его "одним движением пера"? Одним не получится. Нужно городить велосипед удаляя в цикле по одному IDу да еще с задержкой в 2-3 секунды. 1 @ Quote Link to comment Short link Share on other sites More sharing options...
RangerRU Posted October 3, 2017 Share Posted October 3, 2017 (edited) @ShuraBB Спасибо за Шикарная возможность!!! Можно узнать, команда на удаление одна/две идет в цикле? BigWorld.player().removeIgnored(dbID) и BigWorld.player().unsetMuted(dbID)? Edited October 3, 2017 by RangerRU @ Quote Link to comment Short link Share on other sites More sharing options...
ShuraBB Posted October 3, 2017 Share Posted October 3, 2017 4 часа назад, RangerRU сказал: Можно узнать, команда на удаление одна/две идет в цикле? Я делал через ContactsManager().removeIgnored(Id) Он делает полное корректное удаление, возможно BigWorld.player().removeIgnored(dbID) ее-же и вызывает - не проверял :-) 1 @ Quote Link to comment Short link Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.