/** * CAPABILITY response parser */ protected function parseCapability($str, $trusted = false) { $str = preg_replace('/^\\* CAPABILITY /i', '', $str); $this->capability = explode(' ', strtoupper($str)); if (!empty($this->prefs['disabled_caps'])) { $this->capability = array_diff($this->capability, $this->prefs['disabled_caps']); } if (!isset($this->prefs['literal+']) && in_array('LITERAL+', $this->capability)) { $this->prefs['literal+'] = true; } if (preg_match('/(\\[| )MUPDATE=.*/', $str)) { self::$mupdate = true; } if ($trusted) { $this->capability_readed = true; } }