]> jfr.im git - irc/unrealircd/unrealircd-webpanel.git/blobdiff - connection.php
Update the color scheme a bit more
[irc/unrealircd/unrealircd-webpanel.git] / connection.php
index be01f48afa134cb3fc1984f4282ee997efb90a5e..985d3fb0af313eae5b15cff1c01fb20c468d54ce 100644 (file)
@@ -1,9 +1,12 @@
 <?php
 
+if (!defined('UPATH'))
+               die("Access denied");
+
 if (!defined('UNREALIRCD_RPC_USER') ||
-        !defined('UNREALIRCD_RPC_PASSWORD') ||
-        !defined('UNREALIRCD_HOST') ||
-        !defined('UNREALIRCD_PORT')
+               !defined('UNREALIRCD_RPC_PASSWORD') ||
+               !defined('UNREALIRCD_HOST') ||
+               !defined('UNREALIRCD_PORT')
 ) die("Unable to find RPC credentials in your config.php");
 
 $tls_verify = (defined('UNREALIRCD_SSL_VERIFY')) ? UNREALIRCD_SSL_VERIFY : true;
@@ -11,9 +14,12 @@ $api_login = UNREALIRCD_RPC_USER.":".UNREALIRCD_RPC_PASSWORD;
 
 /* Connect now */
 try {
-        $rpc = new UnrealIRCd\Connection("wss://".UNREALIRCD_HOST.":".UNREALIRCD_PORT,
-                                         $api_login,
-                                         Array("tls_verify"=>$tls_verify));
+               $rpc = new UnrealIRCd\Connection
+               (
+                       "wss://".UNREALIRCD_HOST.":".UNREALIRCD_PORT,
+                       $api_login,
+                       Array("tls_verify"=>$tls_verify)
+               );
 } catch (Exception $e) {
-        die("Unable to connect to UnreaIRCd<br>");
+               die("Unable to connect to UnreaIRCd<br>");
 }