X-Git-Url: https://jfr.im/git/irc/unrealircd/unrealircd-webpanel.git/blobdiff_plain/53c3262154b4828643ec075a42c30b6decb01377..67bff06aa6fd4d7d3a9aefc2919307326fa6d755:/api/users.php
diff --git a/api/users.php b/api/users.php
index 1093862..c2e6234 100644
--- a/api/users.php
+++ b/api/users.php
@@ -4,14 +4,15 @@ define('NO_EVENT_STREAM_HEADER',1);
require_once('common_api.php');
header("Content-type: application/json; charset=utf-8");
+if (!$rpc)
+ die(json_encode([]));
+
/* Get the user list */
$users = $rpc->user()->getAll();
$out = [];
foreach($users as $user)
{
- // base64_encode($user->id)
-
$isBot = (strpos($user->user->modes, "B") !== false) ? ' Bot' : "";
$nick = htmlspecialchars($user->name).$isBot;
@@ -35,7 +36,7 @@ foreach($users as $user)
$nick = "id."\">$nick";
$out[] = [
- "Select" => "", /* yeah ridiculous to have here in this file and the feed ;) */
+ "Select" => "", /* yeah ridiculous to have here in this file and the feed ;) */
"Nick" => $nick,
"Country" => $country,
"Host/IP" => $hostip,