public static function get_information(&$ircdata) { if (isset($ircdata[0]) && $ircdata[0] == 'CAPAB' && $ircdata[1] == 'MODULES') { if (strpos($ircdata[2], 'm_services_account.so') === false) { timer::add(array('core', 'check_services', array()), 1, 1); } else { core::$services_account = true; } // we have services_account if (strpos($ircdata[2], 'm_globops.so') !== false) { self::$globops = true; } // we have globops! if (strpos($ircdata[2], 'm_chghost.so') !== false) { self::$chghost = true; } // we have chghost if (strpos($ircdata[2], 'm_chgident.so') !== false) { self::$chgident = true; } // and chgident } // only trigger when our modules info is coming through if (isset($ircdata[0]) && $ircdata[0] == 'CAPAB' && $ircdata[1] == 'CAPABILITIES') { $data = explode('=', $ircdata[16]); $data = $data[1]; $new_mdata = isset($mdata) ? explode('=', $mdata) : ''; $rmodes = ''; if (strpos($data, 'q') !== false) { self::$owner = true; self::$status_modes[] .= 'q'; $rmodes .= 'q'; } // check if +q is there if (strpos($data, 'a') !== false) { self::$protect = true; self::$status_modes[] .= 'a'; $rmodes .= 'a'; } // and +a $hdata = implode(' ', $ircdata); if (strpos($hdata, 'HALFOP=1') !== false) { self::$halfop = true; self::$status_modes[] .= 'h'; $rmodes .= 'h'; } // we check halfop differently self::$status_modes[] .= 'o'; self::$status_modes[] .= 'v'; $modes = str_replace(',', '', $data); self::$modes = $rmodes . $modes . 'ov'; } // only trigger when the capab capabilities is coming through return true; }
public static function get_information(&$ircdata) { if (isset($ircdata[0]) && $ircdata[0] == 'PROTOCTL') { $data = explode('=', $ircdata[13]); $data = $data[1]; $new_mdata = isset($mdata) ? explode('=', $mdata) : ''; $rmodes = ''; if (strpos($data, 'h') !== false) { self::$halfop = true; self::$status_modes[] .= 'h'; $rmodes .= 'h'; } // and +h self::$status_modes[] .= 'q'; self::$status_modes[] .= 'a'; $rmodes .= 'q'; $rmodes .= 'a'; self::$status_modes[] .= 'o'; self::$status_modes[] .= 'v'; // we dont check for q/a, cause unreal supports them no matter what $modes = str_replace(',', '', $data); self::$modes = $rmodes . $modes . 'ov'; } // only trigger when the capab capabilities is coming through return true; }