From 31826f382f62c232759cdf170fc2f6f8376db190 Mon Sep 17 00:00:00 2001 From: Ryan Hitchman Date: Fri, 23 Jan 2015 10:57:43 -0800 Subject: [PATCH] Fix #129: bot.py main() broke everything (oops) --- bot.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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'