* @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);
}
/*
$this->regcheck = true;
}
- $this->fake_irc = new Fake_Irc;
+ $this->fake_irc = new FakeIrc;
/*
* Commands allowed to return output to a channel
* @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' =>