mirror of
https://git.wownero.com/wownero/tippero.git
synced 2024-08-15 00:33:14 +00:00
Warn when a command is redefined
This commit is contained in:
parent
cb9a2fccae
commit
e1cd8042c1
1 changed files with 3 additions and 1 deletions
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/python
|
#!/bin/python
|
||||||
#
|
#
|
||||||
# Cryptonote tipbot - commands
|
# Cryptonote tipbot - commands
|
||||||
# Copyright 2014 moneromooo
|
# Copyright 2014,2015 moneromooo
|
||||||
#
|
#
|
||||||
# The Cryptonote tipbot is free software; you can redistribute it and/or
|
# 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
|
# 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])
|
SendTo(nick, "%s" % msgs[msg])
|
||||||
|
|
||||||
def RegisterCommand(command):
|
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
|
commands[command['name']] = command
|
||||||
|
|
||||||
def RegisterIdleFunction(module,function):
|
def RegisterIdleFunction(module,function):
|
||||||
|
|
Loading…
Reference in a new issue