Fix #129: bot.py main() broke everything (oops)
This commit is contained in:
parent
d9e03b2dd3
commit
31826f382f
7
bot.py
7
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'
|
||||
|
|
Loading…
Reference in New Issue