mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-12-05 09:37:23 +01:00
src/ircutils.py: A nasty hack around mIRC's broken color code rules. Must specify a foreground color if a background color is being specified, so we'll default it to white.
This commit is contained in:
parent
4de0a49489
commit
07be8cd2c0
@ -287,7 +287,10 @@ def mircColor(s, fg=None, bg=None):
|
|||||||
return '\x03%s%s\x03' % (fg.zfill(2), s)
|
return '\x03%s%s\x03' % (fg.zfill(2), s)
|
||||||
elif fg is None:
|
elif fg is None:
|
||||||
bg = mircColors[str(bg)]
|
bg = mircColors[str(bg)]
|
||||||
return '\x03,%s%s\x03' % (bg.zfill(2), s)
|
# According to the mirc color doc, a fg color MUST be specified if a
|
||||||
|
# background color is specified. So, we'll specify 00 (white) if the
|
||||||
|
# user doesn't specify one.
|
||||||
|
return '\x0300,%s%s\x03' % (bg.zfill(2), s)
|
||||||
else:
|
else:
|
||||||
fg = mircColors[str(fg)]
|
fg = mircColors[str(fg)]
|
||||||
bg = mircColors[str(bg)]
|
bg = mircColors[str(bg)]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user