dferrante / pywx

python weather bot
10 stars 3 forks source link

Italics and underline don't work #38

Open dziban303 opened 1 year ago

dziban303 commented 1 year ago

Bold works, but trying to set text to italics or underline doesn't seem to work. I don't think the commands are actually being sent:

image

2022-07-12 00:25:19,760 INFO got command wxcolors {'sender': 'dziban303', 'ident': ':dziban303!dziban303', 'mask': 'user/dziban303', 'chan': '#TropicalWeather', 'msg': 'wxcolors', 'command': 'wxcolors', 'args': '', 'bot': <pythabot.Pythabot object at 0x7fa14f2130>}
2022-07-12 00:25:19,764 INFO PRIVMSG: b'\x0301black\x03 \x0302navy\x03 \x0305maroon\x03 \x0303green\x03 \x0314grey\x03 \x0312royal\x03 \x0311aqua\x03 \x0309lime\x03 \x0315silver\x03 \x0307orange\x03 \x0313pink\x03 \x0306purple\x03 \x0304red\x03 \x0310teal\x03 \x0300white\x03 \x0308yellow\x03 \x03null\x03 \x0freset\x03 \x02bold\x03 italic\x03 underline\x03'

I see the bold command, \x02, but there aren't any \x1D or \x1F for italics/underlined text. Note how 'italic' and 'underline' are both bold though; I rearranged the cmap in base.py to put the italic code first. It still doesn't work, but now the text 'italic' isn't bolded:

image