X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FIrc%2Fextlib%2Fphergie%2FPhergie%2FPlugin%2FServe.php;h=19ecb0c7e4a01856f3c7c6706dcc339e5cb7ec99;hb=678911af249ddc5d2db8d182ce3fd0c748c05fd7;hp=cdb8f7f9198115b070c9243e330ff9e9c544f816;hpb=c71319419bd00ee563fd87a6fe2f202293441d82;p=quix0rs-gnu-social.git diff --git a/plugins/Irc/extlib/phergie/Phergie/Plugin/Serve.php b/plugins/Irc/extlib/phergie/Phergie/Plugin/Serve.php index cdb8f7f919..19ecb0c7e4 100755 --- a/plugins/Irc/extlib/phergie/Phergie/Plugin/Serve.php +++ b/plugins/Irc/extlib/phergie/Phergie/Plugin/Serve.php @@ -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';