]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/Xmpp/XmppPlugin.php
updated
[quix0rs-gnu-social.git] / plugins / Xmpp / XmppPlugin.php
index a2521536bcfdbbd240932636263406c097a6b3b4..66468b5f259a817b3dfa5a467755ef283ab64a65 100644 (file)
@@ -34,8 +34,6 @@ if (!defined('STATUSNET')) {
     exit(1);
 }
 
-set_include_path(get_include_path() . PATH_SEPARATOR . INSTALLDIR . '/extlib/XMPPHP');
-
 /**
  * Plugin for XMPP
  *
@@ -287,7 +285,7 @@ class XmppPlugin extends ImPlugin
         switch ($cls)
         {
         case 'XMPPHP_XMPP':
-            require_once 'XMPP.php';
+            require_once $dir . '/extlib/XMPPHP/XMPP.php';
             return false;
         case 'Sharing_XMPP':
         case 'Queued_XMPP':
@@ -371,13 +369,13 @@ class XmppPlugin extends ImPlugin
         $from = $this->normalize($pl['from']);
 
         if ($pl['type'] != 'chat') {
-            common_log(LOG_WARNING, "Ignoring message of type ".$pl['type']." from $from.");
-            return true;
+            $this->log(LOG_WARNING, "Ignoring message of type ".$pl['type']." from $from: " . $pl['xml']->toString());
+            return;
         }
 
         if (mb_strlen($pl['body']) == 0) {
-            common_log(LOG_WARNING, "Ignoring message with empty body from $from.");
-            return true;
+            $this->log(LOG_WARNING, "Ignoring message with empty body from $from: "  . $pl['xml']->toString());
+            return;
         }
 
         $this->handle_incoming($from, $pl['body']);