protected function _cmdListScripts()
{
$this->_checkAuthenticated();
$result = $this->_doCmd('LISTSCRIPTS');
$scripts = array();
$activescript = null;
$result = explode("\r\n", $result);
foreach ($result as $value) {
if (preg_match('/^"(.*)"( ACTIVE)?$/i', $value, $matches)) {
$script_name = stripslashes($matches[1]);
$scripts[] = $script_name;
if (!empty($matches[2])) {
$activescript = $script_name;
}
}
}
return array($scripts, $activescript);
}