if not nick: print "Config file has no nick entry" sys.exit(1) realname = config.get_realname() if not realname: print "Config file has no realname entry" sys.exit(1) quitmessage = config.get_quitmessage() if not quitmessage: print "Config file has no quitmessage entry" sys.exit(1) command_prefixes = config.get_command_prefixes() if not command_prefixes: print "Config file has no command-prefixes entry" sys.exit(1) ignore_patterns = config.get_ignores() for i in range(0, len(ignore_patterns)): ignore_patterns[i] = re.sub(r'\\\*', ".*", re.escape(ignore_patterns[i])) pipe = os.popen('git log --pretty=format:"git commit %h (%s)"') version = pipe.readline().strip() pipe.close() commandref = '''!help <key> -- get help about <key> !man <section> <name> -- get the URL to an online man page !synopsis <section> <name> -- get the SYNOPSIS section of the specified man page !man <criteria> -- search for an online man page !xkcd -- get a link to a random xkcd comic !xkcd <number> -- get the link to the specified xkcd !xkcd-linux -- get a random xkcd comic that mentions Linux