dr.botzo, Module: misc cleaning up of old crap
This commit is contained in:
parent
d6561bf221
commit
f017422e69
@ -18,7 +18,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from ConfigParser import NoSectionError, NoOptionError
|
||||
|
||||
import inspect
|
||||
import logging
|
||||
import re
|
||||
import sys
|
||||
|
@ -20,24 +20,18 @@ from ConfigParser import ConfigParser, NoSectionError, NoOptionError
|
||||
import logging
|
||||
import logging.config
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
import inspect
|
||||
import sqlite3
|
||||
|
||||
import DrBotIRC
|
||||
from extlib import irclib
|
||||
|
||||
moduleList = [ "Countdown", "Dice", "IrcAdmin", "GoogleTranslate", "Seen", "FactFile" ]
|
||||
modObjs = []
|
||||
|
||||
config_file = 'dr.botzo.cfg'
|
||||
# check argv
|
||||
if len(sys.argv) == 2:
|
||||
config_file = sys.argv[1]
|
||||
|
||||
# read config file
|
||||
|
||||
config = ConfigParser({'debug': 'false'})
|
||||
config.read(os.path.expanduser(config_file))
|
||||
|
||||
@ -100,8 +94,6 @@ try:
|
||||
mods = cfgmodlist.split(',')
|
||||
for mod in mods:
|
||||
irc.load_module(mod)
|
||||
except NoSectionError as e:
|
||||
log.error("You seem to be missing a modules config section, which you probably wanted.")
|
||||
except NoOptionError as e:
|
||||
log.error("You seem to be missing a modlist config option, which you probably wanted.")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user