]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/Irc/extlib/phergie/Phergie/Plugin/Serve.php
Revert "Merged in Phergie changes"
[quix0rs-gnu-social.git] / plugins / Irc / extlib / phergie / Phergie / Plugin / Serve.php
index cdb8f7f9198115b070c9243e330ff9e9c544f816..19ecb0c7e4a01856f3c7c6706dcc339e5cb7ec99 100755 (executable)
@@ -113,23 +113,22 @@ class Phergie_Plugin_Serve extends Phergie_Plugin_Abstract
         $item = $this->getItem($database, $table, $match);
 
         // Reprocess the request for censorship if required
-        if ($this->plugins->hasPlugin('Censor')) {
+        $attempts = 0;
+        while ($censor && $attempts < 3) {
             $plugin = $this->plugins->getPlugin('Censor');
-            $attempts = 0;
-            while ($censor && $attempts < 3) {
-                $clean = $plugin->cleanString($item->name);
-                if ($item->name != $clean) {
-                    $attempts++;
-                    $item = $this->getItem($database, $table, $match);
-                } else {
-                    $censor = false;
-                }
-            }
-            if ($censor && $attempts == 3) {
-                $this->doAction($this->event->getSource(), 'shrugs.');
+            $clean = $plugin->cleanString($item->name);
+            if ($item->name != $clean) {
+                $attempts++;
+                $item = $this->getItem($database, $table, $match);
+            } else {
+                $censor = false;
             }
         }
 
+        if ($censor && $attempts == 3) {
+            $this->doAction($this->event->getSource(), 'shrugs.');
+        }
+
         // Derive the proper article for the item
         if (preg_match('/^[aeiou]/i', $item->name)) {
             $article = 'an';