|
| 1 | +# ============================================================================= |
| 2 | +# >> IMPORTS |
| 3 | +# ============================================================================= |
| 4 | +# Source.Python Admin |
| 5 | +from admin.admin import main_menu |
| 6 | +from admin.core.frontends.menus import AdminMenuSection |
| 7 | + |
| 8 | +# Included Plugin |
| 9 | +from .blocks.base import BlockCommAdminCommand |
| 10 | +from .blocks.voice import ( |
| 11 | + block_voice_feature, blocked_voice_user_manager, unblock_any_voice_feature, |
| 12 | + unblock_my_voice_feature, UnblockAnyVoiceAdminCommand, |
| 13 | + UnblockMyVoiceAdminCommand) |
| 14 | +from .strings import plugin_strings |
| 15 | + |
| 16 | + |
| 17 | +# ============================================================================= |
| 18 | +# >> MENU ENTRIES |
| 19 | +# ============================================================================= |
| 20 | +menu_section = main_menu.add_entry(AdminMenuSection( |
| 21 | + main_menu, plugin_strings['section_title main'])) |
| 22 | + |
| 23 | +menu_section_chat = menu_section.add_entry(AdminMenuSection( |
| 24 | + menu_section, plugin_strings['section_title chat'])) |
| 25 | + |
| 26 | +menu_section_voice = menu_section.add_entry(AdminMenuSection( |
| 27 | + menu_section, plugin_strings['section_title voice'])) |
| 28 | + |
| 29 | +#menu_section_chat.add_entry(BlockCommAdminCommand( |
| 30 | +# block_chat_feature, |
| 31 | +# menu_section_chat, |
| 32 | +# plugin_strings['popup_title block_chat'])) |
| 33 | + |
| 34 | +menu_section_voice.add_entry(BlockCommAdminCommand( |
| 35 | + block_voice_feature, |
| 36 | + menu_section_voice, |
| 37 | + plugin_strings['popup_title block_voice'])) |
| 38 | + |
| 39 | +#menu_section_chat.add_entry(UnblockAnyChatAdminCommand( |
| 40 | +# unblock_any_chat_feature, |
| 41 | +# menu_section_chat, |
| 42 | +# plugin_strings['popup_title unblock_chat_any'])) |
| 43 | + |
| 44 | +menu_section_voice.add_entry(UnblockAnyVoiceAdminCommand( |
| 45 | + unblock_any_voice_feature, |
| 46 | + menu_section_voice, |
| 47 | + plugin_strings['popup_title unblock_voice_any'])) |
| 48 | + |
| 49 | +#menu_section_voice.add_entry(UnblockMyChatAdminCommand( |
| 50 | +# unblock_my_chat_feature, |
| 51 | +# menu_section_chat, |
| 52 | +# plugin_strings['popup_title unblock_chat'])) |
| 53 | + |
| 54 | +menu_section_voice.add_entry(UnblockMyVoiceAdminCommand( |
| 55 | + unblock_my_voice_feature, |
| 56 | + menu_section_voice, |
| 57 | + plugin_strings['popup_title unblock_voice'])) |
| 58 | + |
| 59 | +# ============================================================================= |
| 60 | +# >> SYNCHRONOUS DATABASE OPERATIONS |
| 61 | +# ============================================================================= |
| 62 | +#blocked_chat_user_manager.refresh() |
| 63 | +blocked_voice_user_manager.refresh() |
0 commit comments