-if ($method == "rpc")
-{
- if (isset($tls_verify))
- {
- if ($tls_verify == "false")
- $tls_verify = false;
- elseif ($tls_verify == "true")
- $tls_verify = true;
- }
- try {
- $rpc = new UnrealIRCd\Connection
- (
- "wss://$host:$port",
- "$user:$password",
- ["tls_verify" => $tls_verify]
- );
- }
- catch (Exception $e)
- {
- die(json_encode(["error" => "Unable to connect to UnrealIRCd: ".$e->getMessage()]));
- }
- die(json_encode(["success" => "Successfully connected"]));
-}
-elseif ($method == "sql")