~tardypad/wee-most

6545320e4c71613c8af20c08bd015eb1ac6b819a — Damien Tardy-Panis 2 months ago e2cb496
Make bot suffix configurable
2 files changed, 7 insertions(+), 2 deletions(-)

M wee_most/config.py
M wee_most/post.py
M wee_most/config.py => wee_most/config.py +6 -1
@@ 24,6 24,11 @@ class PluginConfig:
            desc= 'Comma separated list of server names to automatically connect to at start',
        ),
        Setting(
            key= 'bot_suffix',
            default= ' [BOT]',
            desc= 'The suffix for bot names',
        ),
        Setting(
            key= 'channel_prefix_direct',
            default= '',
            desc= 'The prefix of buffer names for direct messages channels',


@@ 46,7 51,7 @@ class PluginConfig:
        Setting(
            key= 'color_bot_suffix',
            default= 'darkgray',
            desc= 'Color for [BOT] suffix in message attachments',
            desc= 'Color for the bot suffix in message attachments',
        ),
        Setting(
            key= 'color_deleted',

M wee_most/post.py => wee_most/post.py +1 -1
@@ 102,7 102,7 @@ def build_nick(user, from_bot, username_override):
        username = colorize_sentence(user.username, user.color)

    if from_bot:
        username += " " + colorize_sentence("[BOT]", config.get_value("color_bot_suffix"))
        username += colorize_sentence(config.get_value("bot_suffix"), config.get_value("color_bot_suffix"))

    return (
        colorize_sentence(nick_prefix, nick_prefix_color_name)