Fix #129: bot.py main() broke everything (oops)

This commit is contained in:
Ryan Hitchman 2015-01-23 10:57:43 -08:00
parent d9e03b2dd3
commit 31826f382f
1 changed files with 4 additions and 3 deletions

7
bot.py
View File

@ -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'