From 8005bdb421eaad1c77195d8efa4aaf169082d51d Mon Sep 17 00:00:00 2001 From: Luke Fitzgerald Date: Tue, 10 Aug 2010 18:34:12 -0700 Subject: [PATCH] Reset message to non-delay type before requeuing --- plugins/Irc/ircmanager.php | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/plugins/Irc/ircmanager.php b/plugins/Irc/ircmanager.php index 7e2b32b23e..aa0ff3539f 100644 --- a/plugins/Irc/ircmanager.php +++ b/plugins/Irc/ircmanager.php @@ -69,8 +69,17 @@ class IrcManager extends ImManager { } } + /** + * Request a maximum timeout for listeners before the next idle period. + * + * @return integer Maximum timeout + */ public function timeout() { - return 1; + if ($this->messageWaiting) { + return 1; + } else { + return 120; + } } /** @@ -95,7 +104,13 @@ class IrcManager extends ImManager { $data = unserialize($wm->data); if (!$this->send_raw_message($data)) { - $this->plugin->enqueue_outgoing_raw($data); + $this->plugin->enqueue_outgoing_raw( + array( + 'type' => 'message', + 'prioritise' => $data['prioritise'], + 'data' => $data['data'] + ) + ); } $wm->delete(); -- 2.39.5