Created
September 2, 2011 14:57
-
-
Save richo/1188834 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ourgit | |
class GitModule(BawtM2): | |
_name = "GitModule" | |
privmsg_re = "^(!|%(nick)s:\s+)git ?([^ ].*)" | |
def handle_privmsg(self, msg): | |
if self.auth(msg.nick): | |
cmd = 'git ' + self.m.group(2) | |
if cmd: | |
self.parent.privmsg(msg.replyto, ourgit.oneline(cmd)) | |
else: | |
self.parent.privmsg(msg.replyto, "You are not authenticated") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment