diff options
author | Luke Fitzgerald <lw.fitzgerald@googlemail.com> | 2010-08-04 09:10:57 -0700 |
---|---|---|
committer | Luke Fitzgerald <lw.fitzgerald@googlemail.com> | 2010-08-04 09:10:57 -0700 |
commit | 65a741cce2a02057e858ab4bbf8b5e8ae8c4a73e (patch) | |
tree | 57a4cf437dde77a474b5dbdd692773e00be841c0 /plugins/Irc/IrcPlugin.php | |
parent | 2250273942aadbdf8ec4603eb693259c359d1b79 (diff) |
Messages with new lines split at plugin stage for reliability
Diffstat (limited to 'plugins/Irc/IrcPlugin.php')
-rw-r--r-- | plugins/Irc/IrcPlugin.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/Irc/IrcPlugin.php b/plugins/Irc/IrcPlugin.php index dec6d7e83..855aa3305 100644 --- a/plugins/Irc/IrcPlugin.php +++ b/plugins/Irc/IrcPlugin.php @@ -165,8 +165,11 @@ class IrcPlugin extends ImPlugin { * @return boolean success value */ public function send_message($screenname, $body) { - $this->fake_irc->doPrivmsg($screenname, $body); - $this->enqueue_outgoing_raw(array('type' => 'message', 'data' => $this->fake_irc->would_be_sent)); + $lines = explode("\n", $body); + foreach ($lines as $line) { + $this->fake_irc->doPrivmsg($screenname, $line); + $this->enqueue_outgoing_raw(array('type' => 'message', 'data' => $this->fake_irc->would_be_sent)); + } return true; } |