Use an event to signal that IM settings are available

Rather than enumerating available classes, define an event that sets a
flag indicating that there's an IM plugin available. Implemented in
implugin.php, so all IM plugins that use that class should
work. Others can hook the event, too.
This commit is contained in:
Evan Prodromou
2011-09-21 15:15:59 -04:00
parent c48cdc7d50
commit ad726a15de
3 changed files with 13 additions and 1 deletions

View File

@@ -620,6 +620,11 @@ abstract class ImPlugin extends Plugin
return true;
}
function onHaveImPlugin(&$haveImPlugin) {
$haveImPlugin = true; // set flag true (we're loaded, after all!)
return false; // stop looking
}
function initialize()
{
if( ! common_config('queue', 'enabled'))