Allow the user to configure the port in the config, and other fixes.
This commit is contained in:
5
phenny
5
phenny
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user