diff options
author | Ryan Huber <rhuber@gmail.com> | 2015-08-01 11:02:25 -0700 |
---|---|---|
committer | Ryan Huber <rhuber@gmail.com> | 2015-08-01 11:02:25 -0700 |
commit | 8008179add3797b2029525628c19c60267e838f6 (patch) | |
tree | 31fae8a19779bbc87c05b74512731d9b476968ea | |
parent | 35cb05a2fe0b0ed70e51ebb15e408a4fa9fd1d35 (diff) | |
parent | 984c178c37d123d7d4dabf8c5ef141d6300e2f4b (diff) | |
download | wee-slack-8008179add3797b2029525628c19c60267e838f6.tar.gz |
Merge pull request #75 from iasoon/master
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 969287e..6db06a6 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -747,23 +747,21 @@ class User(object): 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 |