diff options
Diffstat (limited to 'wee_slack.py')
-rw-r--r-- | wee_slack.py | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/wee_slack.py b/wee_slack.py index cd51444..8ad8989 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -696,23 +696,21 @@ class User(SlackThing): def update_color(self): if colorize_nicks: - self.color = w.info_get('irc_nick_color', self.name) - self.color_name = w.info_get('irc_nick_color_name', self.name) + if self.name == self.server.nick: + self.color_name = w.config_string(w.config_get('weechat.color.chat_nick_self')) + else: + self.color_name = w.info_get('irc_nick_color_name', self.name) + self.color = w.color(self.color_name) else: self.color = "" self.color_name = "" def formatted_name(self, prepend="", force_color=None): if colorize_nicks: - if self.name == self.server.nick: - return prepend + self.name - elif not force_color: - print_color = self.color - else: - print_color = force_color - return print_color + prepend + self.name + print_color = force_color or self.color else: - return prepend + self.name + print_color = "" + return print_color + prepend + self.name def open(self): t = time.time() + 1 |