aboutsummaryrefslogtreecommitdiffstats
path: root/local/utility.py
diff options
context:
space:
mode:
authorkongr45gpen <electrovesta@gmail.com>2014-05-11 13:52:29 +0300
committerkongr45gpen <electrovesta@gmail.com>2014-05-11 13:54:26 +0300
commit9b117389606bbe5c398c52bf7001c0324ba83183 (patch)
treef1bc94fef6b6ffa5c1587481d41306473e02a49b /local/utility.py
parent32f28055bd0e6368f0b13c8d40e9fc11e18b8cef (diff)
downloadsupybot_github-9b117389606bbe5c398c52bf7001c0324ba83183.tar.gz
supybot_github-9b117389606bbe5c398c52bf7001c0324ba83183.tar.bz2
supybot_github-9b117389606bbe5c398c52bf7001c0324ba83183.zip
Handle travis hook messages
Diffstat (limited to 'local/utility.py')
-rw-r--r--local/utility.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/local/utility.py b/local/utility.py
index 5aa8724..fa8ca28 100644
--- a/local/utility.py
+++ b/local/utility.py
@@ -41,7 +41,8 @@ def maxLen(msg, maxn=400):
def colorAction(action):
"""Give an action string (e.g. created, edited) and get a nice IRC colouring"""
- if action == "created" or action == "opened" or action == "tagged" or action == "success":
+ if action == "created" or action == "opened" or action == "tagged" or \
+ action == "success" or action == "passed":
return ircutils.bold(ircutils.mircColor(action, "green"))
if action == "deleted" or action == "closed" or action == "re-tagged" or \
action == "deleted tag" or action == "failed" or action == "errored" or \
@@ -73,9 +74,9 @@ def saveMessages(msgs):
globals.messageList = msgs
def clean(string):
- """Strips IRC control characters from a string"""
- regex = re.compile("(([\x02\x1f\x16\x0f])|(\x03(?:\d{1,2}(?:,\d{1,2})?)?))", re.UNICODE)
- return regex.sub('', string)
+ """Strips IRC control characters from a string"""
+ regex = re.compile("(([\x02\x1f\x16\x0f])|(\x03(?:\d{1,2}(?:,\d{1,2})?)?))", re.UNICODE)
+ return regex.sub('', string)
# Possible colours:
# white, black, (light/dark) blue, (light) green, red, brown, purple,

© 2014-2024 Faster IT GmbH | imprint | privacy policy