From 706dc53d40bd940e5b75b254b9c96fd846d26daa Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Sat, 30 Aug 2008 01:21:43 -0400 Subject: [PATCH] strtolower jids for comparison darcs-hash:20080830052143-84dde-81ba3f1e687605d23e9bdc2c3672ac7ae36f9b60.gz --- scripts/xmppdaemon.php | 2 +- scripts/xmppqueuehandler.php | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/xmppdaemon.php b/scripts/xmppdaemon.php index b1cdb914c1..d3e767e094 100755 --- a/scripts/xmppdaemon.php +++ b/scripts/xmppdaemon.php @@ -95,7 +95,7 @@ class XMPPDaemon { # Forwarded from another daemon (probably a broadcaster) for # us to handle - if (preg_match('/^'.jabber_daemon_address().'/', $from)) { + if (preg_match('/^'.strtolower(jabber_daemon_address()).'/', strtolower($from))) { $from = $this->get_ofrom($pl); if (is_null($from)) { return; diff --git a/scripts/xmppqueuehandler.php b/scripts/xmppqueuehandler.php index a82f5b9445..489ae7e7ca 100755 --- a/scripts/xmppqueuehandler.php +++ b/scripts/xmppqueuehandler.php @@ -61,6 +61,9 @@ class XmppQueueHandler extends QueueHandler { } function forward_message(&$pl) { + if ($pl['type'] != 'chat') { + return; + } $listener = $this->listener(); $this->log(LOG_INFO, 'Forwarding message from ' . $pl['from'] . ' to ' . $listener); $this->conn->message($this->listener(), $pl['body'], 'chat', NULL, $this->ofrom($pl['from'])); -- 2.39.5