Merge branch 'patch-1' into 'master'

Allow for color numbers above 10 to render correctly

See merge request oneseveneight/tcirc!2

(cherry picked from commit 283d43acc651dc159c277500fdbef29dce3a016d)

569b1532 allow for numbers above 10 to render correctly
This commit is contained in:
oneseveneight 2018-10-21 04:01:24 +00:00
parent 1cd881ef21
commit 93ea004a36
1 changed files with 1 additions and 1 deletions

View File

@ -175,7 +175,7 @@ def irc_to_mc():
irc.send(bytes('PRIVMSG ' + channel + ' :' + response + '\n', 'utf8'))
print('PRIVMSG ' + channel + ' :' + response)
else:
text = re.sub("([\x03\x0f])([0-9A-Fa-f](?:,[0-9A-Fa-f])?)?",irc_to_mc_colors,text)
text = re.sub("([\x03\x0f])([0-9A-Fa-f]{1,2}(?:,[0-9A-Fa-f]{1,2})?)?",irc_to_mc_colors,text)
rcon.command('say ' + text[:-2])
elif 'JOIN' in text or 'PART' in text: