X-Git-Url: https://jfr.im/git/irc/unrealircd/unrealircd-webpanel.git/blobdiff_plain/ab23a9355b0b75deddab4b3c70768752fa62d0a1..ea90b321a4b3768028d841b307c362af97a5e6e1:/misc/server-lookup-misc.php diff --git a/misc/server-lookup-misc.php b/misc/server-lookup-misc.php index 96870d3..8902ac7 100644 --- a/misc/server-lookup-misc.php +++ b/misc/server-lookup-misc.php @@ -1,61 +1,383 @@ + + + + + + + + server->features->chanmodes as $set) + { + if (!$set) + break; + for ($i = 0; isset($set[$i]); $i++) + { + $mode = $set[$i]; + if (isset(IRCList::$cmodes[$mode])) { + ?> + + + + + + + + + + + +
NameModeDescriptionRequires
UnknownMode ""
server->features->software)) ? $server->server->features->software : ""; + $return = ""; + $tooltip = ""; + $badge = ""; + $display_string = $string; + + if (strlen($string) && strpos($string,"-")) + { + $tok = split($string, "-"); + if (($tok[0] == "UnrealIRCd") && isset($tok[2])) + { + if ($tok[2] == "git") + { + if (!empty($tok[3])) + $badge = "git:".$tok[3]; + else + $badge = "git"; + $tooltip = "Installed from GitHub"; + $display_string = $tok[0]."-".$tok[1]."-".$tok[2]; + } else if (substr($tok[2],0,2) == "rc") + { + $tooltip = "Release Candidate/Beta Version"; + $badge = "rc"; + } else if (strlen($tok[2]) == 9) + { + /* Guess that this is a commit id :D */ + $badge = "git:".$tok[2]; + $tooltip = "Installed from GitHub"; + $display_string = $tok[0]."-".$tok[1]; + } + $tooltip = htmlspecialchars($tooltip); + $display_string = htmlspecialchars($display_string); + } + $return = "" . $display_string . "
$badge
"; + } + if (isset($server->server->ulined) && $server->server->ulined) + $return .= "
Services
"; + return $return; +} +function generate_html_serverinfo($server) +{ + global $rpc; + ?> - + - + + + + + + + server->uplink)) ? $rpc->server()->get($server->server->uplink) : "None"; ?> + - - + + + + + + +
Namename; ?>name); ?>
Server ID (SID)id; ?>id); ?>
Infoserver->info); ?>
Uplinkid)."\">".htmlspecialchars($server->server->uplink).""; ?>
Hosthostname; ?>User countserver->num_users); ?>
Version
+ + server->features->usermodes; + echo ""; + for ($i=0; ($mode = (isset($modes[$i])) ? $modes[$i] : NULL); $i++) + { + + if ($mode == "o") + { + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + "; +} + +function generate_html_extserverinfo($server) +{ + ?> +
Oper + User is an IRC Operator. +
Service Bot + User is a Services Bot. +
DeafUser is ignoring channel messages.
InvisibleNot shown in /WHO searches.
Private channelsChannels hidden in /WHOIS outputs.
Registered NickUser is using a registered nick.
Server NoticesUser is receiving server notices.
Virtual HostUsing a custom hostmask.
WallopsListening to /WALLOPS notices from IRC Operators.
HostmaskUsing a hostmask (hiding their IP from non-IRCops).
Secure + User is using a secure connection. +
Bot + User is marked as a Bot. +
PrivDeaf + User is rejecting incoming private messages. +
Filter + User is filtering Bad Words. +
Hide IRCop + User is hiding their IRCop status. +
Hide Idle + User is hiding their idle time. +
RegOnly Messages + User is only accepting private messages from registered users. +
Deny CTCPs + Denying CTCP requests. +
View /WHOIS + User is receiving notifications when someone does a /WHOIS on them. +
Deny Insecure Messages + User is only accepting messages from users using a secure connection. +
+ + - + - - + + - - + + - - + + - - + + - - - - - -
IPip." "; - if ($cc = (isset($server->geoip->country_code)) ? strtolower($server->geoip->country_code) : "") - { - ?> - - ip); ?>
Identuser->username; ?>Boot timeserver->boot_time); ?>
GECOS / Real Nameuser->realname; ?>U-Linedserver->ulined) ? "Yes" : "No"; ?>
Virtual Hostuser->vhost)) ? $server->user->vhost : ""; ?>Protocolserver->features->protocol); ?>
Connected touser->servername; ?>TLS + + + + + + + + + +
Cert Fingerprint".htmlspecialchars($server->tls->certfp).""; ?>
TLS Cipher".htmlspecialchars($server->tls->cipher).""; ?>
+
Logged in asuser->account)) ? $server->user->account : ""; ?>
- server()->module_list($srv->id); - ?> + if (!$modules || !$modules->list) + { + echo $rpc->error; + } else { + ?> @@ -67,23 +389,48 @@ function generate_html_modlist($srv) list as $module) - { - echo "\n"; - echo ""; - $desc = $module->description; - $short_desc = substr($desc, 0, 70); // truncate to 80 chars - if (strlen($desc) > strlen($short_desc)) - $short_desc .= "..."; - echo ""; - $source = (!$module->third_party) ? "
Official
" : "
Third-Party
"; - echo ""; - echo ""; - echo ""; - } + foreach ($modules->list as $module) { + echo "\n"; + echo ""; + $desc = $module->description; + $short_desc = substr($desc, 0, 70); // truncate to 80 chars + if (strlen($desc) > strlen($short_desc)) + $short_desc .= "..."; + echo ""; + $source = (!$module->third_party) ? "
Official
" : "
Third-Party
"; + echo ""; + echo ""; + echo ""; + } + } ?>
$module->name$short_desc$source$module->author$module->version
".htmlspecialchars($module->name)."".htmlspecialchars($short_desc)."$source".htmlspecialchars($module->author)."".htmlspecialchars($module->version)."
$value) + { + if ($key > $biggest) + $biggest = $key; + } + if (!$biggest) + { + Message::Fail("Could not get latest version of UnrealIRCd. Please check again later."); + return NULL; + } + return $arr[$biggest]['Stable']['version']; } \ No newline at end of file