mirror of
https://git.wownero.com/wownero/tippero.git
synced 2024-08-15 00:33:14 +00:00
Add a list of invalid commands to ignore
To avoid the botspam when someone's using another bot
This commit is contained in:
parent
e893d293f0
commit
1726d85d5c
2 changed files with 12 additions and 1 deletions
|
@ -169,7 +169,13 @@ def OnCommand(link,cmd,check_admin,check_registered):
|
|||
else:
|
||||
c['function'](link,cmd)
|
||||
else:
|
||||
link.send("Invalid command, try !help")
|
||||
silent = False
|
||||
if link.network.name in config.silent_invalid_commands:
|
||||
if cmdname in config.silent_invalid_commands[link.network.name]:
|
||||
log_info('silently ignoring command %s on %s' % (cmdname,link.network.name))
|
||||
silent = True
|
||||
if not silent:
|
||||
link.send("Invalid command, try !help")
|
||||
|
||||
def RunIdleFunctions(param=None):
|
||||
for f in idles:
|
||||
|
|
|
@ -40,6 +40,11 @@ admins = ["freenode:moneromooo", "freenode:moneromoo"]
|
|||
# list of nicks to ignore for rains - bots, trolls, etc
|
||||
no_rain_to_nicks = []
|
||||
|
||||
# commands used by other bots, to avoid "unknown command" complaints
|
||||
silent_invalid_commands = {
|
||||
'freenode': ['price','worth','net','pools','calc']
|
||||
}
|
||||
|
||||
dice_edge = 0.01
|
||||
dice_max_bet = 5
|
||||
dice_min_bet = 0.001
|
||||
|
|
Loading…
Reference in a new issue