Skip to content

Instantly share code, notes, and snippets.

@richo
Created September 2, 2011 14:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save richo/1188834 to your computer and use it in GitHub Desktop.
Save richo/1188834 to your computer and use it in GitHub Desktop.
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