From cf60629422036cf3d8d6e10b086eb600cd16c975 Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 18 Dec 2013 18:24:18 +0100 Subject: Reaktor: add command-not-found-pattern --- Reaktor/config.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Reaktor/config.py b/Reaktor/config.py index 1b285e4b..8e7a8790 100644 --- a/Reaktor/config.py +++ b/Reaktor/config.py @@ -1,5 +1,7 @@ debug = True + +# CAVEAT name should not contains regex magic name = 'kwasybot' irc_alarm_timeout = 300 @@ -25,6 +27,10 @@ irc_commands = [ default_command('rev'), default_command('uptime'), default_command('nocommand'), - { 'pattern': '^.*\\b' + name + '(?:\\b[^:].*)?$', + # command not found + { 'pattern': '^(?:' + name + '|\\*):.*', + 'argv': [ 'commands/say', '{TODO:fromname}: you are made of stupid!' ] }, + # "highlight" + { 'pattern': '\\b' + name + '\\b', 'argv': [ 'commands/say', 'I\'m famous' ] } ] -- cgit v1.2.3