This code is simpler ;)
if (JRequest::getCmd("task") == "icalrepeat.detail" && $params->get('showindetails', 0) == 0){ 
	return;
}
require(JModuleHelper::getLayoutPath('mod_jevents_filter'));