diff --git a/bot.py b/bot.py index 0cea5c7..cba5594 100755 --- a/bot.py +++ b/bot.py @@ -14,18 +14,19 @@ class Bot(object): if not os.path.exists(self.persist_dir): os.mkdir(self.persist_dir) +bot = Bot() + def main(): sys.path += ['plugins'] # so 'import hook' works without duplication sys.path += ['lib'] os.chdir(sys.path[0] or '.') # do stuff relative to the install directory - bot = Bot() - print 'Loading plugins' # bootstrap the reloader eval(compile(open(os.path.join('core', 'reload.py'), 'U').read(), - os.path.join('core', 'reload.py'), 'exec')) + os.path.join('core', 'reload.py'), 'exec'), + globals()) reload(init=True) print 'Connecting to IRC'