Allow the user to configure the port in the config, and other fixes.

This commit is contained in:
Sean B. Palmer
2008-04-26 15:54:35 +01:00
parent 286d4a8497
commit 986953131d
8 changed files with 22 additions and 7 deletions

5
phenny
View File

@@ -116,11 +116,16 @@ def main(argv=None):
name = os.path.basename(config_name).split('.')[0] + '_config'
module = imp.load_source(name, config_name)
module.filename = config_name
if not hasattr(module, 'prefix'):
module.prefix = r'\.'
if not hasattr(module, 'name'):
module.name = 'Phenny Palmersbot, http://inamidst.com/phenny/'
if not hasattr(module, 'port'):
module.port = 6667
if module.host == 'irc.example.net':
error = ('Error: you must edit the config file first!\n' +
"You're currently using %s" % module.filename)