diff options
author | Ilion Beyst <ilion.beyst@gmail.com> | 2015-05-23 18:11:46 +0200 |
---|---|---|
committer | Ilion Beyst <ilion.beyst@gmail.com> | 2015-05-23 18:20:38 +0200 |
commit | 984c178c37d123d7d4dabf8c5ef141d6300e2f4b (patch) | |
tree | 5e80278701c8fc47f9f7822695902bc985ea06ee | |
parent | cf541b430014e2fb597185c77e5008215f1685eb (diff) | |
download | wee-slack-984c178c37d123d7d4dabf8c5ef141d6300e2f4b.tar.gz |
Colored own nick as weechat.color.chat_nick_self
-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 |