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))