summaryrefslogtreecommitdiff
path: root/scripts/xmppqueuehandler.php
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/xmppqueuehandler.php')
-rwxr-xr-xscripts/xmppqueuehandler.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/xmppqueuehandler.php b/scripts/xmppqueuehandler.php
index 2adcdf7e4..040191c28 100755
--- a/scripts/xmppqueuehandler.php
+++ b/scripts/xmppqueuehandler.php
@@ -67,6 +67,10 @@ class XmppQueueHandler extends QueueHandler {
return;
}
$listener = $this->listener();
+ if (strtolower($listener) == strtolower($pl['from'])) {
+ $this->log(LOG_WARNING, 'Ignoring loop message.');
+ return;
+ }
$this->log(LOG_INFO, 'Forwarding message from ' . $pl['from'] . ' to ' . $listener);
$this->conn->message($this->listener(), $pl['body'], 'chat', NULL, $this->ofrom($pl['from']));
}