+ <table class="table-sm table-responsive caption-top table-hover">
+ <thead>
+ <th>Name</th>
+ <th>Mode</th>
+ <th>Description</th>
+ <th>Requires</th>
+ </thead>
+ <?php
+ foreach ($server->server->features->chanmodes as $set)
+ {
+ if (!$set)
+ break;
+ for ($i = 0; isset($set[$i]); $i++)
+ {
+ $mode = $set[$i];
+ if (isset(IRCList::$cmodes[$mode])) {
+ ?>
+ <tr>
+ <th><?php echo IRCList::$cmodes[$mode]['name']; ?></th>
+ <th><code><?php echo $mode; ?></code></th>
+ <td><?php echo IRCList::$cmodes[$mode]['description']; ?></td>
+ <td><div class="badge rounded-pill badge-dark"><?php echo IRCList::$cmodes[$mode]['requires']; ?></div></td>
+ </tr><?php
+ }
+ else {
+ ?>
+ <tr>
+ <th>Unknown</th>
+ <td>Mode "<?php echo $mode; ?>"</td>
+ <td></td>
+ </tr><?php
+ }
+
+ }
+ }
+ ?>
+ </table><?php
+}
+
+function sinfo_conv_version_string($server) : string
+{
+ $string = (isset($server->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 = "<span data-toggle=\"tooltip\" data-placement=\"bottom\" title=\"$tooltip\"><code>" . $display_string . "</code> <div class=\"badge rounded-pill badge-dark\">$badge</div></a>";
+ }
+ if (isset($server->server->ulined) && $server->server->ulined)
+ $return .= "<div class=\"badge rounded-pill badge-warning\">Services</div>";
+ return $return;
+}