diff options
author | tv <tv@shackspace.de> | 2014-07-15 12:12:28 +0200 |
---|---|---|
committer | tv <tv@shackspace.de> | 2014-07-15 12:12:28 +0200 |
commit | 0f626437e0816d15602051f9b2252095bfcdabaf (patch) | |
tree | b847a0acd04baaab0e8f2695588fcd8eaf1033ff /IRC/reaktor.py | |
parent | c21d8f1f55651607f82a9f60b3f89402fb9fdc47 (diff) |
Reaktor on_ping -> nag
Diffstat (limited to 'IRC/reaktor.py')
-rwxr-xr-x | IRC/reaktor.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/IRC/reaktor.py b/IRC/reaktor.py index 9a3424a..799fe55 100755 --- a/IRC/reaktor.py +++ b/IRC/reaktor.py @@ -39,6 +39,12 @@ class Reaktor(asybot): for command in getconf('on_join', []): self.execute_command(command, None, prefix, params) + def on_ping(self, prefix, command, params, rest): + for command in getconf('on_ping', []): + prefix = '!' # => env = { _prefix: '!', _from: '' } + params = command.get('targets') # TODO why don't we get a list here and use ','.join() ? + self.execute_command(command, None, prefix, params) + def on_privmsg(self, prefix, command, params, rest): for command in getconf('commands'): y = match(command['pattern'], rest) |