Mercurial > xib
comparison irclib.py @ 87:500d47b1d8cd
Better color stripping for IRC messages
Signed-off-by: Charly COSTE <changaco@changaco.net>
author | Charly COSTE <changaco@changaco.net> |
---|---|
date | Mon, 07 Sep 2009 00:51:43 +0200 |
parents | bfa32b017fc9 |
children | 94fc538cdf65 |
comparison
equal
deleted
inserted
replaced
86:bfa32b017fc9 | 87:500d47b1d8cd |
---|---|
88 # ----- | 88 # ----- |
89 # connection.quit() only sends QUIT to the server. | 89 # connection.quit() only sends QUIT to the server. |
90 # ERROR from the server triggers the error event and the disconnect event. | 90 # ERROR from the server triggers the error event and the disconnect event. |
91 # dropping of the connection triggers the disconnect event. | 91 # dropping of the connection triggers the disconnect event. |
92 | 92 |
93 strip_formatting_re = re.compile('(?:\x03[0-9]*|\x02)') | 93 strip_formatting_re = re.compile('(?:\x03[0-9]*(?:,[0-9]+)?|\x02)') |
94 | 94 |
95 class IRCError(Exception): | 95 class IRCError(Exception): |
96 """Represents an IRC exception.""" | 96 """Represents an IRC exception.""" |
97 pass | 97 pass |
98 | 98 |