Пример #1
0
    def quick_gui_img(self, directory, img_data, format_img=False, caption=None, caption_align='center', caption_font=None, bgcolor="black", channel=None, user=None, img_size=65536, cellspacing="5"):
        if self.box_open:
            return False
        if channel is None:
            channel = runtime_utils.get_my_channel()

        self.open_box(align='left', bgcolor=bgcolor, cellspacing=cellspacing)

        if format_img:
            formatted_string = IH.format_image(f"{img_data}", "jpg", directory, size_goal=img_size)
            content = self.make_content(formatted_string, image=True, text_align='center')
            if content is not None:
                self.append_row(content)
        else:
            content = self.make_content(img_data, image=True, text_align='center')
            if content is not None:
                self.append_row(content)

        if caption is not None:
            caption = self.make_content(caption, text_type="header", text_font=caption_font, text_align=caption_align, image=False)
            self.append_row(caption)

        self.close_box()

        self.display_box(channel=channel, user=user)
        self.clear_display()
Пример #2
0
    def cmd_pguistresstest(self, data):
        all_data = data.message.strip().split(' ', 1)
        if len(all_data) < 2:
            num_of_lines = 5
        else:
            num_of_lines = int(all_data[1])

        import random
        bg_colors = [
            "Blue", "Cyan", "Magenta", "Red", "Yellow", "Green", "Lime",
            "Black", "Snow", "Violet", "Salmon", "Purple", "Pink", "Navy",
            "MintCream", "Maroon", "Gray", "Indigo", "Coral", "Ivory", "Gold",
            "DodgerBlue", "CadetBlue", "Brown", "Beige", "Aquamarine"
        ]
        GS.gui_service.open_box()

        for x in range(num_of_lines):
            content = GS.gui_service.make_content(
                f'<font color="{random.choice(bg_colors)}">[{x}] - PGUI STRESS TEST</font>',
                text_type='header',
                text_align="left",
                bgcolor=random.choice(bg_colors))
            GS.gui_service.append_row(content)
            random.seed(x)

        GS.gui_service.close_box()
        GS.gui_service.display_box(channel=rutils.get_my_channel())
        log(INFO,
            f"Conducted PGUI stress test in the channel.",
            origin=L_COMMAND,
            print_mode=PrintMode.VERBOSE_PRINT.value)
Пример #3
0
 def cmd_makechannel(self, data):
     data_actor = gs.mumble_inst.users[data.actor]['name']
     channel_name = data.message.strip().split(' ', 1)[1]
     rutils.make_channel(rutils.get_my_channel(), channel_name)
     dprint(f"Made a channel: {channel_name} by {data_actor}",
            origin=L_COMMAND)
     log(INFO,
         f"Made a channel: {channel_name} by {data_actor}",
         origin=L_COMMAND)
Пример #4
0
 async def make_temporary_channel(self, command: StdModel):
     if len(command.text) > 0:
         rutils.make_channel(rutils.get_my_channel(),
                             command.text.strip(),
                             temporary=False)
         return ResponseModel(200, "success").toDict()
     return ResponseModel(
         400, "error", {
             "error_message":
             f"Please be sure to provide a valid permanent channel name!"
         })
Пример #5
0
    def cmd_mhw_search(self, data):
        all_data = data.message.strip().split(' ', 1)
        if len(all_data) != 2:
            log(ERROR,
                CMD_INVALID_SEARCH,
                origin=L_COMMAND,
                error_type=CMD_INVALID_ERR,
                print_mode=PrintMode.VERBOSE_PRINT.value)
            global_settings.gui_service.quick_gui(
                CMD_INVALID_SEARCH,
                text_type='header',
                box_align='left',
                user=global_settings.mumble_inst.users[data.actor]['name'],
                ignore_whisper=True)
            return
        search_term = all_data[1].strip()
        # Retrieve the monster data dictionary and display an error if a valid monster isn't found.
        log(INFO,
            f"Searching monster hunter information for {search_term}",
            origin=L_COMMAND,
            print_mode=PrintMode.VERBOSE_PRINT.value)
        monster_fuzzes = search_monsters(search_term, search_threshold=70)
        if monster_fuzzes is None or len(monster_fuzzes) == 0:
            log(INFO,
                f"There were no results for the search query: {search_term}",
                origin=L_COMMAND,
                print_mode=PrintMode.VERBOSE_PRINT.value)
            global_settings.gui_service.quick_gui(
                f"There were no results for the search query: {search_term}",
                text_type='header',
                box_align='left')
            return

        # Construct the UI for the monster information.
        global_settings.gui_service.open_box(align='center')
        log(INFO,
            "Formatting MHW wiki information into PGUI...",
            origin=L_COMMAND,
            print_mode=PrintMode.VERBOSE_PRINT.value)
        # Append monster search results.
        monster_results = create_monster_list(monster_fuzzes)
        global_settings.gui_service.append_row(monster_results)
        # Close the UI.
        global_settings.gui_service.close_box()
        global_settings.gui_service.display_box(channel=get_my_channel(),
                                                ignore_whisper=True)
        log(INFO,
            f"Displayed monster hunter information search results for {search_term}",
            origin=L_COMMAND,
            print_mode=PrintMode.VERBOSE_PRINT.value)
Пример #6
0
    def quick_gui(self,
                  content: Union[List[str], str],
                  text_type="data",
                  text_color=None,
                  text_font=None,
                  text_align="center",
                  bgcolor=None,
                  border=None,
                  box_align=None,
                  row_align="center",
                  cellpadding="5",
                  cellspacing="5",
                  channel=None,
                  user=None,
                  ignore_whisper=False):
        if self.box_open:
            return False
        if channel is None:
            channel = runtime_utils.get_my_channel()
        if bgcolor is None:
            bgcolor = GS.cfg[C_PGUI_SETTINGS][P_CANVAS_BG_COL]
        if box_align is None:
            box_align = GS.cfg[C_PGUI_SETTINGS][P_CANVAS_ALGN]
        if border is None:
            border = GS.cfg[C_PGUI_SETTINGS][P_CANVAS_BORD]
        if text_color is None:
            text_color = GS.cfg[C_PGUI_SETTINGS][P_CANVAS_TXT_COL]

        self.open_box(bgcolor=bgcolor,
                      border=border,
                      align=box_align,
                      cellspacing=cellspacing,
                      cellpadding=cellpadding)
        # Convert the content message into a list if it is a single string.
        if not isinstance(content, list):
            content = [content]
        # Convert the content message list into a string delimited by <br>
        content = "<br>".join(content) if len(content) > 1 else content[0]
        content = self.make_content(content,
                                    text_type=text_type,
                                    text_color=text_color,
                                    text_font=text_font,
                                    text_align=text_align)
        self.append_row(content, align=row_align)
        self.close_box()
        self.display_box(channel=channel,
                         user=user,
                         ignore_whisper=ignore_whisper)
        self.clear_display()
Пример #7
0
    def quick_gui(self,
                  content,
                  text_type="data",
                  text_color=None,
                  text_font='Calibri',
                  text_align="center",
                  bgcolor=None,
                  border=None,
                  box_align=None,
                  row_align="center",
                  cellpadding="5",
                  cellspacing="5",
                  channel=None,
                  user=None,
                  ignore_whisper=False):
        if self.box_open:
            return False
        if channel is None:
            channel = runtime_utils.get_my_channel()
        if bgcolor is None:
            bgcolor = GS.cfg[C_PGUI_SETTINGS][P_CANVAS_BG_COL]
        if box_align is None:
            box_align = GS.cfg[C_PGUI_SETTINGS][P_CANVAS_ALGN]
        if border is None:
            border = GS.cfg[C_PGUI_SETTINGS][P_CANVAS_BORD]
        if text_color is None:
            text_color = GS.cfg[C_PGUI_SETTINGS][P_CANVAS_TXT_COL]

        self.open_box(bgcolor=bgcolor,
                      border=border,
                      align=box_align,
                      cellspacing=cellspacing,
                      cellpadding=cellpadding)
        content = self.make_content(content,
                                    text_type=text_type,
                                    text_color=text_color,
                                    text_font=text_font,
                                    text_align=text_align)
        self.append_row(content, align=row_align)
        self.close_box()
        self.display_box(channel=channel,
                         user=user,
                         ignore_whisper=ignore_whisper)
        self.clear_display()
Пример #8
0
 def cmd_makepermanentchannel(self, data):
     split_data = data.message.strip().split(' ', 1)
     if len(split_data) != 2:
         log(ERROR,
             CMD_INVALID_MAKE_PERM,
             origin=L_COMMAND,
             error_type=CMD_INVALID_ERR,
             print_mode=PrintMode.VERBOSE_PRINT.value)
         gs.gui_service.quick_gui(
             CMD_INVALID_MAKE_PERM,
             text_type='header',
             box_align='left',
             user=gs.mumble_inst.users[data.actor]['name'],
             ignore_whisper=True)
         return
     rutils.make_channel(rutils.get_my_channel(), split_data[1])
     log(INFO,
         f"Made a channel: {split_data[1]} by {gs.mumble_inst.users[data.actor]['name']}",
         origin=L_COMMAND,
         print_mode=PrintMode.VERBOSE_PRINT.value)
Пример #9
0
 def cmd_makechannel(self, data):
     data_actor = gs.mumble_inst.users[data.actor]['name']
     split_data = data.message.strip().split(' ', 1)
     if len(split_data) != 2:
         rprint(
             f"Incorrect format! Format: {rutils.get_command_token()}makechannel 'channel_name'"
         )
         gs.gui_service.quick_gui(
             f"Incorrect format! Format: {rutils.get_command_token()}makechannel 'channel_name'",
             text_type='header',
             box_align='left',
             user=gs.mumble_inst.users[data.actor]['name'],
             ignore_whisper=True)
         return
     channel_name = split_data[1]
     rutils.make_channel(rutils.get_my_channel(), channel_name)
     dprint(f"Made a channel: {channel_name} by {data_actor}",
            origin=L_COMMAND)
     log(INFO,
         f"Made a channel: {channel_name} by {data_actor}",
         origin=L_COMMAND)
Пример #10
0
    def cmd_help(self, data):
        all_data = data.message.strip().split()
        if len(all_data) < 2:
            all_plugin_names = [plugin for plugin in list(GS.bot_plugins)]
            all_plugin_metadata = [{
                "name":
                plugin_name,
                "metadata":
                GS.bot_plugins[plugin_name].metadata
            } for plugin_name in all_plugin_names]
            all_core_plugin_names = [
                (plugin_info["name"],
                 plugin_info["metadata"][C_PLUGIN_INFO][P_PLUGIN_NAME])
                for plugin_info in all_plugin_metadata
                if plugin_info["metadata"].getboolean(C_PLUGIN_TYPE,
                                                      P_CORE_PLUGIN)
            ]
            all_extension_plugin_names = [
                (plugin_info["name"],
                 plugin_info["metadata"][C_PLUGIN_INFO][P_PLUGIN_NAME])
                for plugin_info in all_plugin_metadata
                if plugin_info["metadata"].getboolean(C_PLUGIN_TYPE,
                                                      P_EXT_PLUGIN)
            ]

            GS.gui_service.open_box()
            content = GS.gui_service.make_content(
                f'<font color="{GS.cfg[C_PGUI_SETTINGS][P_TXT_HEAD_COL]}">##### </font>'
                f'<b>{rutils.get_bot_name()} General Help Commands</b>'
                f'<font color="{GS.cfg[C_PGUI_SETTINGS][P_TXT_HEAD_COL]}"> #####</font>'
            )
            GS.gui_service.append_row(content)

            content = GS.gui_service.make_content(
                f'<font color="{GS.cfg[C_PGUI_SETTINGS][P_TXT_HEAD_COL]}">##### </font>'
                f'<b>Core Plugins</b>'
                f'<font color="{GS.cfg[C_PGUI_SETTINGS][P_TXT_HEAD_COL]}"> #####</font>'
            )
            GS.gui_service.append_row(content)
            for x, plugin_info in enumerate(all_core_plugin_names):
                content = GS.gui_service.make_content(
                    f'<font color="{GS.cfg[C_PGUI_SETTINGS][P_TXT_SUBHEAD_COL]}">!help {plugin_info[0].strip()}</font> - Displays help information for the <font color="{GS.cfg[C_PGUI_SETTINGS][P_TXT_IND_COL]}">{plugin_info[1]}</font> plugin.',
                    text_type='header',
                    text_align="left")
                GS.gui_service.append_row(content)

            content = GS.gui_service.make_content(
                f'<font color="{GS.cfg[C_PGUI_SETTINGS][P_TXT_HEAD_COL]}">##### </font>'
                f'<b>Extension Plugins</b>'
                f'<font color="{GS.cfg[C_PGUI_SETTINGS][P_TXT_HEAD_COL]}"> #####</font>'
            )
            GS.gui_service.append_row(content)
            for x, plugin_info in enumerate(all_extension_plugin_names):
                content = GS.gui_service.make_content(
                    f'<font color="{GS.cfg[C_PGUI_SETTINGS][P_TXT_SUBHEAD_COL]}">!help {plugin_info[0].strip()}</font> - Displays help information for the <font color="{GS.cfg[C_PGUI_SETTINGS][P_TXT_IND_COL]}">{plugin_info[1].strip()}</font> plugin.',
                    text_type='header',
                    text_align="left")
                GS.gui_service.append_row(content)

            GS.gui_service.close_box()
            GS.gui_service.display_box(channel=rutils.get_my_channel())
            log(INFO,
                f"Displayed general help screen in the channel.",
                origin=L_COMMAND,
                print_mode=PrintMode.VERBOSE_PRINT.value)
            return

        plugin_name = all_data[1]
        plugin_help_data = PluginUtilityService.process_help(
            db_cursor=get_memory_db().cursor(), plugin_name=plugin_name)
        if plugin_help_data:
            plugin_metadata = GS.bot_plugins[plugin_name].metadata

            GS.gui_service.open_box()
            all_help_lines = [
                msg.strip() for msg in plugin_help_data.split('<br>')
            ]
            content = GS.gui_service.make_content(
                f'<font color="red">##### </font>'
                f'<b>{rutils.get_bot_name()} Help Commands - [{plugin_name}]</b>'
                f'<font color="red"> #####</font>')
            GS.gui_service.append_row(content)
            content = GS.gui_service.make_content(
                f'Plugin Version: {plugin_metadata[C_PLUGIN_INFO][P_PLUGIN_VERS]}<br>',
                text_color='cyan')
            GS.gui_service.append_row(content)
            for x, help_item in enumerate(all_help_lines):
                item_parts = help_item.rsplit(':', 1)
                if len(item_parts) > 1:
                    content = GS.gui_service.make_content(
                        f'<font color="yellow">{item_parts[0]}</font>:{item_parts[1]}',
                        text_type='header',
                        text_align="left")
                else:
                    content = GS.gui_service.make_content(f'{help_item}',
                                                          text_type='header',
                                                          text_align="left")
                GS.gui_service.append_row(content)
            GS.gui_service.close_box()
            GS.gui_service.display_box(channel=rutils.get_my_channel())
            log(INFO,
                f"Displayed help screen for {plugin_name} in the channel.",
                origin=L_COMMAND,
                print_mode=PrintMode.VERBOSE_PRINT.value)
Пример #11
0
    def cmd_mhw(self, data):
        all_data = data.message.strip().split(' ', 1)
        if len(all_data) != 2:
            return
        search_term = all_data[1].strip()

        # Retrieve the monster data dictionary and display an error if a valid monster isn't found.
        log(f"Attempting to retrieve monster hunter information for {search_term}",
            origin=L_COMMAND,
            print_mode=PrintMode.VERBOSE_PRINT.value)
        monster_data_dict = find_monster(self.monster_definitions,
                                         monster_name=search_term,
                                         search_threshold=70)
        if monster_data_dict is None:
            log(ERROR,
                f"This monster was not found in the monster name dictionary: {search_term}",
                origin=L_COMMAND,
                print_mode=PrintMode.VERBOSE_PRINT.value)
            global_settings.gui_service.quick_gui(
                f"This monster was not found in the monster name dictionary: {search_term}",
                text_type='header',
                box_align='left')
            return

        # Construct the UI for the monster information.
        global_settings.gui_service.open_box(align='center')
        log(INFO,
            "Formatting MHW wiki information into PGUI...",
            origin=L_COMMAND,
            print_mode=PrintMode.VERBOSE_PRINT.value)

        # Part 1 - UI Creation: Create the monster title
        monster_title = create_monster_title(monster_data_dict)
        global_settings.gui_service.append_row(monster_title)
        log(INFO,
            f"Created monster title text for {search_term}...",
            origin=L_COMMAND,
            print_mode=PrintMode.VERBOSE_PRINT.value)

        # Part 2 - UI Creation: Create the monster image
        if self.metadata.getboolean(C_PLUGIN_SETTINGS,
                                    P_USE_IMAGE,
                                    fallback=False):
            monster_image = create_monster_image(
                monster_data_dict,
                int(self.metadata[C_PLUGIN_SETTINGS][P_IMG_MAX_SIZE]))
            global_settings.gui_service.append_row(monster_image)
            log(INFO,
                f"Created monster image for {search_term}...",
                origin=L_COMMAND,
                print_mode=PrintMode.VERBOSE_PRINT.value)

        # Part 3 - UI Creation: Create the monster type
        monster_type = create_monster_type(monster_data_dict)
        global_settings.gui_service.append_row(monster_type)
        log(INFO,
            f"Created monster type text for {search_term}...",
            origin=L_COMMAND,
            print_mode=PrintMode.VERBOSE_PRINT.value)

        # Part 4 - UI Creation: Create the monster ailments
        monster_ailments = create_monster_ailments(monster_data_dict)
        global_settings.gui_service.append_row(monster_ailments)
        log(INFO,
            f"Created monster ailments text for {search_term}...",
            origin=L_COMMAND,
            print_mode=PrintMode.VERBOSE_PRINT.value)

        # Part 5 - UI Creation: Create the monster weaknesses
        monster_weaknesses = create_monster_weaknesses(monster_data_dict)
        global_settings.gui_service.append_row(monster_weaknesses)
        log(INFO,
            f"Created monster ailments text for {search_term}...",
            origin=L_COMMAND,
            print_mode=PrintMode.VERBOSE_PRINT.value)

        # Part 6 - UI Creation: Create the monster location
        monster_locations = create_monster_locations(monster_data_dict)
        global_settings.gui_service.append_row(monster_locations)
        log(INFO,
            f"Created monster locations text for {search_term}...",
            origin=L_COMMAND,
            print_mode=PrintMode.VERBOSE_PRINT.value)

        # Part 7 - UI Creation: Create the monster wiki link
        # Add the wiki link of the monster to the monster data dictionary.
        monster_link_format = monster_data_dict["name"].replace(" ", "+")
        monster_data_dict[
            'link'] = f'<a href="https://monsterhunterworld.wiki.fextralife.com/{monster_link_format}">{monster_data_dict["name"]}</a>'
        monster_link = create_monster_link(monster_data_dict)
        global_settings.gui_service.append_row(monster_link)
        log(INFO,
            f"Created MHW wiki link text for {search_term}...",
            origin=L_COMMAND,
            print_mode=PrintMode.VERBOSE_PRINT.value)

        log(INFO,
            "Finished creating MHW wiki PGUI.",
            origin=L_COMMAND,
            print_mode=PrintMode.VERBOSE_PRINT.value)

        # Close the UI.
        global_settings.gui_service.close_box()
        global_settings.gui_service.display_box(channel=get_my_channel(),
                                                ignore_whisper=True)
        log(INFO,
            f"Displayed monster hunter information for {search_term}",
            origin=L_COMMAND,
            print_mode=PrintMode.VERBOSE_PRINT.value)
Пример #12
0
    def process(self, text):
        message = text.message.strip()
        message_parse = message[1:].split(' ', 1)
        command = message_parse[0]

        if command == "sleep":
            if not privileges.plugin_privilege_checker(text, command,
                                                       self.plugin_name):
                return
            sleep_time = float(text.message[1:].split(' ', 1)[1].strip())
            RS.tick_rate = sleep_time
            sleep(sleep_time)
            RS.tick_rate = float(GS.cfg[C_MAIN_SETTINGS][P_CMD_TICK_RATE])

        elif command == "version":
            if not privileges.plugin_privilege_checker(text, command,
                                                       self.plugin_name):
                return
            GS.gui_service.quick_gui(
                f"{rutils.get_bot_name()} is on version {rutils.get_version()}",
                text_type='header',
                box_align='left')

        elif command == "about":
            if not privileges.plugin_privilege_checker(text, command,
                                                       self.plugin_name):
                return
            GS.gui_service.quick_gui(
                f"{rutils.get_about()}<br>{rutils.get_bot_name()} is on version {rutils.get_version()}",
                text_type='header',
                box_align='left')

        elif command == "uptime":
            if not privileges.plugin_privilege_checker(text, command,
                                                       self.plugin_name):
                return
            GS.gui_service.quick_gui(
                rutils.check_up_time(),
                text_type='header',
                box_align='left',
                ignore_whisper=True,
                user=GS.mumble_inst.users[text.actor]['name'])

        elif command == "exit":
            if not privileges.plugin_privilege_checker(text, command,
                                                       self.plugin_name):
                return
            dprint("Stopping all threads...")
            rutils.exit_bot()
            log(INFO, "JJ Mumble Bot is being shut down.")
            log(INFO, "######################################")

        elif command == "reboot":
            import os
            import sys
            if not privileges.plugin_privilege_checker(text, command,
                                                       self.plugin_name):
                return
            rutils.exit_bot()
            log(INFO, "JJ Mumble Bot is being rebooted.", origin=L_STARTUP)
            os.execv(sys.executable, ['python3'] + sys.argv)  # nosec

        elif command == "safereboot":
            import os
            import sys
            if not privileges.plugin_privilege_checker(text, command,
                                                       self.plugin_name):
                return
            rutils.exit_bot()
            log(INFO,
                "JJ Mumble Bot is being rebooted in safe mode.",
                origin=L_STARTUP)
            os.execv(sys.executable,
                     ['python3'] + sys.argv + ['-safe'])  # nosec

        elif command == "refresh":
            if not privileges.plugin_privilege_checker(text, command,
                                                       self.plugin_name):
                return
            rutils.refresh_plugins()

        elif command == "help":
            if not privileges.plugin_privilege_checker(text, command,
                                                       self.plugin_name):
                return
            message = text.message.strip()
            message_parse = message[1:].split(' ', 2)
            if len(message_parse) < 2:
                return
            plugin_name = message_parse[1]

            plugin_help_data = PluginUtilityService.process_help(
                db_cursor=get_memory_db().cursor(), plugin_name=plugin_name)
            if plugin_help_data:
                GS.gui_service.open_box()
                all_help_lines = [
                    msg.strip() for msg in plugin_help_data.split('<br>')
                ]
                content = GS.gui_service.make_content(
                    f'<font color="red">##### </font>'
                    f'<b>{rutils.get_bot_name()} Help Commands - [{plugin_name}]</b>'
                    f'<font color="red"> #####</font>')
                GS.gui_service.append_row(content)
                content = GS.gui_service.make_content(
                    f'Plugin Version: {self.metadata[C_PLUGIN_INFO][P_PLUGIN_VERS]}<br>',
                    text_color='cyan')
                GS.gui_service.append_row(content)
                for i, item in enumerate(all_help_lines):
                    item_parts = item.split(':', 1)
                    if len(item_parts) > 1:
                        content = GS.gui_service.make_content(
                            f'<font color="yellow">{item_parts[0]}</font>:{item_parts[1]}',
                            text_type='header',
                            text_align="left")
                    else:
                        content = GS.gui_service.make_content(
                            f'{item}', text_type='header', text_align="left")
                    GS.gui_service.append_row(content)
                GS.gui_service.close_box()
                GS.gui_service.display_box(channel=rutils.get_my_channel())
                dprint(
                    f"Displayed help screen for {plugin_name} in the channel.")
                log(INFO,
                    f"Displayed help screen for {plugin_name} in the channel.",
                    origin=L_COMMAND)

        elif command == "alias":
            if not privileges.plugin_privilege_checker(text, command,
                                                       self.plugin_name):
                return
            message = text.message.strip()
            message_parse = message[1:].split(' ', 2)
            if len(message_parse) < 2:
                return
            alias_name = message_parse[1]

            if aliases.add_to_aliases(alias_name, message_parse[2]):
                GS.gui_service.quick_gui(
                    f"Registered new alias: [{alias_name}] - [{message_parse[2]}]",
                    text_type='header',
                    box_align='left',
                    ignore_whisper=True,
                    user=GS.mumble_inst.users[text.actor]['name'])
            elif aliases.set_alias(alias_name, message_parse[2]):
                GS.gui_service.quick_gui(
                    f"Registered alias: [{alias_name}] - [{message_parse[2]}]",
                    text_type='header',
                    box_align='left',
                    ignore_whisper=True,
                    user=GS.mumble_inst.users[text.actor]['name'])

        elif command == "aliases":
            if not privileges.plugin_privilege_checker(text, command,
                                                       self.plugin_name):
                return
            aliases_list = aliases.get_all_aliases()
            if len(aliases_list) == 0:
                cur_text = f"<font color='{GS.cfg[C_PGUI_SETTINGS][P_TXT_HEAD_COL]}'>Registered Aliases: None</font>"
            else:
                cur_text = f"<font color='{GS.cfg[C_PGUI_SETTINGS][P_TXT_HEAD_COL]}'>Registered Aliases:</font>"
                for i, alias in enumerate(aliases_list):
                    cur_text += f"<br><font color={GS.cfg[C_PGUI_SETTINGS][P_TXT_IND_COL]}>[{alias[0]}]</font> - " \
                                f"[{BeautifulSoup(alias[1], 'html.parser').get_text()}] "
                    if i % 50 == 0 and i != 0:
                        GS.gui_service.quick_gui(
                            cur_text,
                            text_type='header',
                            box_align='left',
                            text_align='left',
                            ignore_whisper=True,
                            user=GS.mumble_inst.users[text.actor]['name'])
                        cur_text = ""
            GS.gui_service.quick_gui(
                cur_text,
                text_type='header',
                box_align='left',
                text_align='left',
                ignore_whisper=True,
                user=GS.mumble_inst.users[text.actor]['name'])

        elif command == "removealias":
            if not privileges.plugin_privilege_checker(text, command,
                                                       self.plugin_name):
                return
            message = text.message.strip()
            message_parse = message[1:].split(' ', 2)
            if len(message_parse) < 2:
                return
            alias_name = message_parse[1]
            if aliases.remove_from_aliases(alias_name):
                GS.gui_service.quick_gui(
                    f'Removed [{alias_name}] from registered aliases.',
                    text_type='header',
                    box_align='left',
                    ignore_whisper=True,
                    user=GS.mumble_inst.users[text.actor]['name'])
            else:
                GS.gui_service.quick_gui(
                    f'Could not remove [{alias_name}] from registered aliases.',
                    text_type='header',
                    box_align='left',
                    ignore_whisper=True,
                    user=GS.mumble_inst.users[text.actor]['name'])

        elif command == "clearaliases":
            if not privileges.plugin_privilege_checker(text, command,
                                                       self.plugin_name):
                return
            if aliases.clear_aliases():
                GS.gui_service.quick_gui(
                    'Cleared all registered aliases.',
                    text_type='header',
                    box_align='left',
                    ignore_whisper=True,
                    user=GS.mumble_inst.users[text.actor]['name'])
            else:
                GS.gui_service.quick_gui(
                    'The registered aliases could not be cleared.',
                    text_type='header',
                    box_align='left',
                    ignore_whisper=True,
                    user=GS.mumble_inst.users[text.actor]['name'])

        elif command == "clearhistory":
            if not privileges.plugin_privilege_checker(text, command,
                                                       self.plugin_name):
                return
            GS.cmd_history.queue_storage.clear()
            GS.gui_service.quick_gui(
                f'<font color="{GS.cfg[C_PGUI_SETTINGS][P_TXT_HEAD_COL]}">Cleared command history.</font>',
                text_type='header',
                box_align='left',
                text_align='left',
                ignore_whisper=True,
                user=GS.mumble_inst.users[text.actor]['name'])

        elif command == "history":
            if not privileges.plugin_privilege_checker(text, command,
                                                       self.plugin_name):
                return
            cur_text = f"<font color='{GS.cfg[C_PGUI_SETTINGS][P_TXT_HEAD_COL]}'>Command History:</font>"
            for i, item in enumerate(GS.cmd_history.queue_storage):
                cur_text += f"<br><font color={GS.cfg[C_PGUI_SETTINGS][P_TXT_IND_COL]}>[{i}]</font> - {item}"
                if i % 50 == 0 and i != 0:
                    GS.gui_service.quick_gui(
                        cur_text,
                        text_type='header',
                        box_align='left',
                        text_align='left',
                        ignore_whisper=True,
                        user=GS.mumble_inst.users[text.actor]['name'])
                    cur_text = ""
            GS.gui_service.quick_gui(
                cur_text,
                text_type='header',
                box_align='left',
                text_align='left',
                ignore_whisper=True,
                user=GS.mumble_inst.users[text.actor]['name'])