diff options
author | tv <tv@nomic.retiolum> | 2014-01-06 01:07:35 +0100 |
---|---|---|
committer | tv <tv@nomic.retiolum> | 2014-01-06 01:07:35 +0100 |
commit | dd7311ab3549cf0b62f837f7efea6c2a8aa864a8 (patch) | |
tree | a99044dbef5caa61c3a80fa66ed71a1ab8635e7b | |
parent | 0db4ada53665b0de75e598deb7331677d33e1fad (diff) | |
parent | b74b6b26326dbbb6f62d8ad6388236f50e882263 (diff) |
Merge branch 'master' of https://github.com/krebscode/painload
-rwxr-xr-x | ircbot/contoller.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/ircbot/contoller.py b/ircbot/contoller.py index 7964708e..0b31f39c 100755 --- a/ircbot/contoller.py +++ b/ircbot/contoller.py @@ -35,9 +35,15 @@ class NewsBot(irc.bot.SingleServerIRCBot): self.connection.privmsg(self.chan, line) sleep(1) + def sendq(self, target, string): + for line in string.split('\n'): + self.connection.privmsg(target, line) + sleep(1) + def on_privmsg(self, connection, event): + args_array = event.arguments[0].split() answer = self.read_message(args_array) - self.send(answer) + self.sendq(event.source.nick, answer) def on_pubmsg(self, connection, event): args_array = event.arguments[0].split() |