I\'m writing a IRC bot in Python using irclib and I\'m trying to log the messages on certain channels.
The issue is that some mIRC users and some Bots write using color
AutoDl-irssi had a very good one written in perl, here it is in python:
def stripMircColorCodes(line) :
line = re.sub("\x03\d\d?,\d\d?","",line)
line = re.sub("\x03\d\d?","",line)
line = re.sub("[\x01-\x1F]","",line)
return line