* @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;
}
$this->regchecksLookup[$usernick] = $screenname;
}
- $args = $data['data']['args'];
- $lines = explode("\n", $args[1]);
try {
- foreach ($lines as $line) {
- $this->conn->send($data['data']['command'], array($args[0], $line));
- }
+ $this->conn->send($data['data']['command'], $data['data']['args']);
} catch (Phergie_Driver_Exception $e) {
$this->conn->reconnect();
return false;