X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FIrc%2FIrcPlugin.php;h=99dc4b2bc125e54e22b86b6e4beca3fded6cf301;hb=1663e2743bb295e04a0d0399d201b45668025e88;hp=aeefded4b005413f6aa3aea2608f112c15d926ca;hpb=3a7261f70a62e28f47b45847c8ab31ff6f441a61;p=quix0rs-gnu-social.git diff --git a/plugins/Irc/IrcPlugin.php b/plugins/Irc/IrcPlugin.php index aeefded4b0..99dc4b2bc1 100644 --- a/plugins/Irc/IrcPlugin.php +++ b/plugins/Irc/IrcPlugin.php @@ -120,24 +120,13 @@ class IrcPlugin extends ImPlugin { * @return boolean hook value; true means continue processing, false means stop. */ public function onAutoload($cls) { - $dir = dirname(__FILE__); - - switch ($cls) { - case 'IrcManager': - include_once $dir . '/'.strtolower($cls).'.php'; - return false; - case 'Fake_Irc': - case 'Irc_waiting_message': - case 'ChannelResponseChannel': - include_once $dir . '/'. $cls .'.php'; - return false; - default: - if (substr($cls, 0, 7) == 'Phergie') { - include_once str_replace('_', DIRECTORY_SEPARATOR, $cls) . '.php'; - return false; - } - return true; + // in the beginning of this file, we have added an include path + if (substr($cls, 0, 7) == 'Phergie') { + include_once str_replace('_', DIRECTORY_SEPARATOR, $cls) . '.php'; + return false; } + + return parent::onAutoload($cls); } /* @@ -367,7 +356,7 @@ class IrcPlugin extends ImPlugin { $this->regcheck = true; } - $this->fake_irc = new Fake_Irc; + $this->fake_irc = new FakeIrc; /* * Commands allowed to return output to a channel @@ -383,9 +372,9 @@ class IrcPlugin extends ImPlugin { * @param array $versions Array to insert information into * @return void */ - public function onPluginVersion(&$versions) { + public function onPluginVersion(array &$versions) { $versions[] = array('name' => 'IRC', - 'version' => STATUSNET_VERSION, + 'version' => GNUSOCIAL_VERSION, 'author' => 'Luke Fitzgerald', 'homepage' => 'http://status.net/wiki/Plugin:IRC', 'rawdescription' =>