From e1cd8042c1098ab1e022ed92a86c7d8283198f63 Mon Sep 17 00:00:00 2001 From: moneromooo Date: Thu, 1 Jan 2015 17:43:01 +0000 Subject: [PATCH] Warn when a command is redefined --- tipbot/command_manager.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tipbot/command_manager.py b/tipbot/command_manager.py index 3bdec29..987dcb6 100644 --- a/tipbot/command_manager.py +++ b/tipbot/command_manager.py @@ -1,7 +1,7 @@ #!/bin/python # # Cryptonote tipbot - commands -# Copyright 2014 moneromooo +# Copyright 2014,2015 moneromooo # # The Cryptonote tipbot is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as published @@ -94,6 +94,8 @@ def Commands(nick,chan,cmd): SendTo(nick, "%s" % msgs[msg]) def RegisterCommand(command): + if command['name'] in commands: + log_warn('module %s redefined function %s from module %s' % (command['module'],command['name'],commands[command['name']]['module'])) commands[command['name']] = command def RegisterIdleFunction(module,function):