From abeff1e1b152dc529119417255ce16d051b1e0f6 Mon Sep 17 00:00:00 2001 From: kongr45gpen Date: Wed, 23 Apr 2014 17:17:22 +0300 Subject: Remove travis code Since Github made it extremely easy to send different types of alerts to hook services (such as the travis build status), we don't need the error-prone solution of checking travis' IRC messages. In a future commit, the bot will be able to handle Github's status messages. --- plugin.py | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'plugin.py') diff --git a/plugin.py b/plugin.py index 003f1a1..24a4af1 100644 --- a/plugin.py +++ b/plugin.py @@ -455,29 +455,6 @@ class Github(callbacks.Plugin): self.httpd.server_close() self.__parent.die() - def doPrivmsg(self, irc, msg): - channel = "#main" - - if not msg.args[1].startswith("[travis-ci]"): - return - - message = msg.args[1] - message = message.replace("failed", colorAction("failed")) - message = message.replace("still failing", colorAction("still failing")) - message = message.replace("fixed", colorAction("fixed")) - message = message.replace("[travis-ci]", ircutils.mircColor("[travis-ci]", "light grey")) - message = re.sub(r'\(([a-zA-Z]+)+ - ([a-zA-Z0-9]+) : ([a-zA-Z0-9]+)\)', \ - "".join(["(", r'\1', " * ", ircutils.bold(r'\2') , " by ", ircutils.mircColor(r'\3', "blue") , ")"]), message) - - if self.travisCount == 0 and msg.args[1].find("passed") == -1: - irc.queueMsg(ircmsgs.privmsg(channel, message)); - self.travisShown = True - elif self.travisCount == 2 and self.travisShown == True: - irc.queueMsg(ircmsgs.privmsg(channel, message)); - self.travisShown = False - - - self.travisCount = (self.travisCount+1) % 3; def toast(self, irc, msg, args, seed, items): """ [ ...] -- cgit v1.2.3