summaryrefslogtreecommitdiff
path: root/scripts/xmppdaemon.php
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/xmppdaemon.php')
-rwxr-xr-xscripts/xmppdaemon.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/xmppdaemon.php b/scripts/xmppdaemon.php
index 574aeab36..1cfcd481f 100755
--- a/scripts/xmppdaemon.php
+++ b/scripts/xmppdaemon.php
@@ -95,9 +95,9 @@ class XMPPDaemon {
# Forwarded from another daemon (probably a broadcaster) for
# us to handle
- if (preg_match('/^'.strtolower(jabber_daemon_address()).'/', strtolower($from))) {
+ if ($this->is_self($from)) {
$from = $this->get_ofrom($pl);
- if (is_null($from)) {
+ if (is_null($from) || $this->is_self($from)) {
return;
}
}
@@ -129,6 +129,10 @@ class XMPPDaemon {
}
}
+ function is_self($from) {
+ return preg_match('/^'.strtolower(jabber_daemon_address()).'/', strtolower($from));
+ }
+
function get_ofrom($pl) {
$xml = $pl['raw'];
$addresses = $xml->sub('addresses');