Standardize Bot class names
This commit is contained in:
parent
f9970cba42
commit
26faed014f
5 changed files with 72 additions and 54 deletions
14
bin/nemubot
14
bin/nemubot
|
|
@ -1,8 +1,8 @@
|
|||
#!/usr/bin/python3
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Nemubot is a modulable IRC bot, built around XML configuration files.
|
||||
# Copyright (C) 2012 Mercier Pierre-Olivier
|
||||
# Nemubot is a smart and modulable IM bot.
|
||||
# Copyright (C) 2012-2014 nemunaire
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as published by
|
||||
|
|
@ -22,14 +22,14 @@ import os
|
|||
import imp
|
||||
import traceback
|
||||
|
||||
from nemubot import Bot
|
||||
import nemubot
|
||||
from nemubot import prompt
|
||||
from nemubot.prompt.builtins import load_file
|
||||
from nemubot import importer
|
||||
|
||||
if __name__ == "__main__":
|
||||
# Create bot context
|
||||
context = Bot(0, "FIXME")
|
||||
context = nemubot.Bot()
|
||||
|
||||
# Load the prompt
|
||||
prmpt = prompt.Prompt()
|
||||
|
|
@ -50,7 +50,7 @@ if __name__ == "__main__":
|
|||
else:
|
||||
load_file(arg, context)
|
||||
|
||||
print ("Nemubot v%s ready, my PID is %i!" % (context.version_txt,
|
||||
print ("Nemubot v%s ready, my PID is %i!" % (nemubot.__version__,
|
||||
os.getpid()))
|
||||
while prmpt.run(context):
|
||||
try:
|
||||
|
|
@ -63,7 +63,7 @@ if __name__ == "__main__":
|
|||
# Reload all other modules
|
||||
bot.reload()
|
||||
print ("\033[1;32mContext reloaded\033[0m, now in Nemubot %s" %
|
||||
context.version_txt)
|
||||
nemubot.__version__)
|
||||
except:
|
||||
print ("\033[1;31mUnable to reload the prompt due to errors.\033[0"
|
||||
"m Fix them before trying to reload the prompt.")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue