aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@nomic.retiolum>2013-12-18 18:24:48 +0100
committertv <tv@nomic.retiolum>2013-12-18 18:28:15 +0100
commit16cd627dcb1a580d6095a2962b48ce7731d8f716 (patch)
tree7e930b255e26870b150bbb96890e4839a2885f23
parenta7c04c54b3836d6d16378e9ec26ac8a52f217fdc (diff)
parenta6e8694560070f1666909cd054e0c3a775f121c0 (diff)
Merge branch 'master' of https://github.com/krebscode/painload
-rwxr-xr-xIRC/asybot.py3
-rw-r--r--TODO3
-rw-r--r--config.py2
3 files changed, 3 insertions, 5 deletions
diff --git a/IRC/asybot.py b/IRC/asybot.py
index 6d19fd0..89967c3 100755
--- a/IRC/asybot.py
+++ b/IRC/asybot.py
@@ -54,7 +54,7 @@ class asybot(asychat):
# passed without a message. Any incoming message will reset alarm.
self.alarm_timeout = getconf('irc_alarm_timeout')
self.hammer_interval = getconf('irc_hammer_interval')
- self.kill_timeout = 360
+ self.kill_timeout = getconf('irc_kill_timeout')
signal(SIGALRM, lambda signum, frame: self.alarm_handler())
self.reset_alarm()
@@ -129,6 +129,7 @@ class asybot(asychat):
y = match(command['pattern'], rest)
if y:
self.execute_command(command, y, PRIVMSG, ME)
+ break
def execute_command(self, command, match, PRIVMSG, ME):
from os.path import realpath, dirname, join
diff --git a/TODO b/TODO
index 6dbc2f8..782a724 100644
--- a/TODO
+++ b/TODO
@@ -1,6 +1,3 @@
-{ "pattern": "^(?:asybot|\\*):.*", "argv": [ "commands/say", "{{from.nickname}}: you are made of stupid" ], only_match: true }
-
-getconf: check syntax and semantics on load
getconf: reload inotify
apropros caps: commands need access to config
diff --git a/config.py b/config.py
index 8e7a879..ec4abcb 100644
--- a/config.py
+++ b/config.py
@@ -31,6 +31,6 @@ irc_commands = [
{ 'pattern': '^(?:' + name + '|\\*):.*',
'argv': [ 'commands/say', '{TODO:fromname}: you are made of stupid!' ] },
# "highlight"
- { 'pattern': '\\b' + name + '\\b',
+ { 'pattern': '.*\\b' + name + '\\b.*',
'argv': [ 'commands/say', 'I\'m famous' ] }
]