aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormakefu <root@pigstarter.de>2013-12-18 23:44:34 +0100
committermakefu <root@pigstarter.de>2013-12-18 23:44:34 +0100
commit2194bdd4b47a31606aadf53af1b258ace593adaf (patch)
tree90b9232a62dce3aae6f38e649c28e4a646c62b92
parent481ab0216f9d877b8cb8bd70e8d0d024d0d86b7d (diff)
Reaktor: add respond to solve complexity in config
-rwxr-xr-xcommands/respond2
-rw-r--r--config.py2
2 files changed, 3 insertions, 1 deletions
diff --git a/commands/respond b/commands/respond
new file mode 100755
index 0000000..e23dc3e
--- /dev/null
+++ b/commands/respond
@@ -0,0 +1,2 @@
+#!/bin/sh
+printf '%s\n' "${_from}: $*"
diff --git a/config.py b/config.py
index ce86faa..0ae7681 100644
--- a/config.py
+++ b/config.py
@@ -30,7 +30,7 @@ commands = [
default_command('nocommand'),
# command not found
{ 'pattern': '^(?:' + name + '|\\*):.*',
- 'argv': [ 'commands/say', '{TODO:fromname}: you are made of stupid!' ] },
+ 'argv': [ 'commands/respond','You are made of stupid!'] },
# "highlight"
{ 'pattern': '.*\\b' + name + '\\b.*',
'argv': [ 'commands/say', 'I\'m famous' ] }