From ea097aad7fd05a57cb89a87120c038fe0a2c9397 Mon Sep 17 00:00:00 2001 From: Ryan Hitchman Date: Tue, 24 Aug 2010 16:59:47 -0500 Subject: [PATCH] redirect links to github --- core/irc.py | 2 +- plugins/misc.py | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/core/irc.py b/core/irc.py index 76a8b36..6f88631 100644 --- a/core/irc.py +++ b/core/irc.py @@ -139,7 +139,7 @@ class IRC(object): self.set_nick(self.nick) self.cmd("USER", [conf.get('user', 'skybot'), "3", "*", conf.get('realname', - 'Python bot - http://bitbucket.org/Scaevolus/skybot/')]) + 'Python bot - http://github.com/rmmh/skybot')]) def parse_loop(self): while True: diff --git a/plugins/misc.py b/plugins/misc.py index 3ce29cf..8ca04e1 100644 --- a/plugins/misc.py +++ b/plugins/misc.py @@ -45,10 +45,13 @@ def onjoin(paraml, conn=None): @hook.regex(r'^\x01VERSION\x01$') def version(inp, notice=None): - p = subprocess.Popen(['hg', 'id', '-n'], stdout=subprocess.PIPE) + p = subprocess.Popen(['git', 'log', '--oneline'], stdout=subprocess.PIPE) stdout, _ = p.communicate() p.wait() + + revnumber = len(stdout.splitlines()) - ret = 'r' + stdout[:-2] - notice('\x01VERSION skybot %s - http://bitbucket.org/Scaevolus/' - 'skybot/\x01' % ret) + ret = stdout.split(None, 1)[0] + + notice('\x01VERSION skybot %s r%d - http://github.com/rmmh/' + 'skybot/\x01' % (ret, revnumber))