diff options
author | Treeki <treeki@gmail.com> | 2014-02-15 11:17:10 +0100 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2014-02-15 11:17:10 +0100 |
commit | f5c91243ce04b5fab96ebe8838e384b0356793e0 (patch) | |
tree | a218cbcb468f3b4a5473d657f4892e39147b45ec /bouncer/richtext.h | |
parent | 848c96b0df5282a9089bd4259e3e6ae3620f3ec9 (diff) | |
download | bounce4-f5c91243ce04b5fab96ebe8838e384b0356793e0.tar.gz bounce4-f5c91243ce04b5fab96ebe8838e384b0356793e0.zip |
add nick colours, fix a bug with RGB colours in richtext
Diffstat (limited to '')
-rw-r--r-- | bouncer/richtext.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/bouncer/richtext.h b/bouncer/richtext.h index 608a1d6..c2f8d01 100644 --- a/bouncer/richtext.h +++ b/bouncer/richtext.h @@ -48,6 +48,11 @@ public: void colour(bool background, int layer, int r, int g, int b) { writeU8(0x10 + (background ? 4 : 0) + layer); + + r >>= 1; + g >>= 1; + b >>= 1; + writeU8((r==0)?2:(r&254)); writeU8((g==0)?1:g); writeU8((b==0)?1:b); @@ -86,6 +91,7 @@ public: } void appendIRC(const char *str); + void appendNick(const char *nick); const char *c_str(); }; |