$this->clientError($e->getMessage(), $e->getCode());
}
- if (isset($upload)) {
+ if ($upload instanceof MediaFile) {
$this->status .= ' ' . $upload->shortUrl();
/* Do not call shortenlinks until the whole notice has been build */
*/
function supported($cmd)
{
- static $cmdlist = array('MessageCommand', 'SubCommand', 'UnsubCommand',
- 'FavCommand', 'OnCommand', 'OffCommand', 'JoinCommand', 'LeaveCommand');
+ static $cmdlist = array('SubCommand', 'UnsubCommand',
+ 'OnCommand', 'OffCommand', 'JoinCommand', 'LeaveCommand');
+
+ $supported = null;
- if (in_array(get_class($cmd), $cmdlist)) {
- return true;
+ if (Event::handle('CommandSupportedAPI', array($cmd, &$supported))) {
+ $supported = $supported || in_array(get_class($cmd), $cmdlist);
}
- return false;
+ return $supported;
}
}