This commit is contained in:
Luke Rogers 2013-10-04 10:56:26 +13:00
parent c2271b1195
commit d4968d478e
3 changed files with 13 additions and 17 deletions

View file

@ -116,12 +116,12 @@ class PluginLoader(object):
for plugin in self.bot.plugins['command']:
name = plugin[1]['name'].lower()
if not re.match(r'^\w+$', name):
self.bot.logger.error('Invalid command name: "{}"" ({})'.format(name, format_plug(plugin)))
self.bot.logger.error('Invalid command name: "{}" ({})'.format(name, format_plug(plugin)))
continue
if name in self.bot.commands:
print "### ERROR: command '{}' already registered ({}, {})".format(name,
self.bot.logger.error('Command already registered: "{}" ({}, {})'.format(name,
format_plug(self.bot.commands[name]),
format_plug(plugin))
format_plug(plugin)))
continue
self.bot.commands[name] = plugin