3 function generate_html_whois($user)
8 <table
class="table-sm table-responsive caption-top table-hover">
12 <td colspan
="2"><code
><?php
echo htmlspecialchars($user->name
); ?></code
></td
>
14 <th
>User
ID (UID
)</th
>
15 <td colspan
="2"><code
><?php
echo htmlspecialchars($user->id
); ?></code
></td
>
18 <td colspan
="2"><code
><?php
echo htmlspecialchars($user->hostname
); ?></code
></td
>
21 <td colspan
="2"><code
><?php
echo htmlspecialchars($user->ip
); ?></code
>
23 if ($cc = (isset($user->geoip
->country_code
)) ? strtolower($user->geoip
->country_code
) : "")
25 ?> <img src
="https://flagcdn.com/48x36/<?php echo htmlspecialchars($cc); ?>.png"
29 <a href
="<?php echo htmlspecialchars(get_config("base_url
")."tools
/ip
-whois
.php
?ip
=$user->ip
"); ?>"><button
class="btn-sm btn-primary">WHOIS IP
</button
></a
>
33 <td colspan
="2"><code
><?php
echo htmlspecialchars($user->user
->username
); ?></code
></td
>
35 <th
>GECOS
/ Real Name
</th
>
36 <td colspan
="2"><code
><?php
echo htmlspecialchars($user->user
->realname
); ?></code
></td
>
39 <td colspan
="2"><code
><?php
echo (isset($user->user
->vhost
)) ? htmlspecialchars($user->user
->vhost
) : ""; ?></code
></td
>
42 <?php
$serverlkup = $rpc->server()->get($user->user
->servername
); ?>
44 <td colspan
="2"><a href
="<?php echo get_config("base_url
")."servers
/details
.php
?server
=$serverlkup->id
"; ?>"><code
><?php
echo htmlspecialchars($user->user
->servername
); ?></code
></td
>
49 <td colspan
="2"><code
><?php
echo (isset($user->user
->account
)) ? "<a href=\"".get_config("base_url")."users/?account=".htmlspecialchars($user->user
->account
)."\">".htmlspecialchars($user->user
->account
)."</a>" : ""; ?></code
></td
>
58 function generate_html_usersettings($user)
62 <table
class="table-sm table-responsive caption-top table-hover">
65 for ($i=0; ($mode = (isset($user->user
->modes
[$i])) ? $user->user
->modes
[$i] : NULL); $i++
)
74 <table
class="table-sm table-responsive caption-top table-hover">
78 $operlogin = (isset($user->user
->operlogin
)) ? $user->user
->operlogin
: "";
79 echo htmlspecialchars($operlogin);
84 <td
><?php
echo (isset($user->user
->operclass
)) ? "<span class=\"rounded-pill badge badge-info\">".htmlspecialchars($user->user
->operclass
)."</span>" : "<span class=\"rounded-pill badge badge-info\">None</span>"; ?></td
>
97 This user is a Services Bot
.
102 elseif ($mode == "d")
107 <td
>User is ignoring channel messages
.</td
>
111 elseif ($mode == "i")
116 <td
>Not shown in
/WHO searches
.</td
>
120 elseif ($mode == "p")
124 <th
>Private channels
</th
>
125 <td
>Channels hidden in
/WHOIS outputs
.</td
>
129 elseif ($mode == "r")
133 <th
>Registered Nick
</th
>
134 <td
>This user is using a registered nick
.</td
>
138 elseif ($mode == "s")
142 <th
>Server Notices
</th
>
143 <td
>This user is receiving server notices
.</td
>
147 elseif ($mode == "t")
151 <th
>Virtual Host
</th
>
152 <td
>Using a custom hostmask
</td
>
156 elseif ($mode == "w")
161 <td
>Listening to
<code
>/WALLOPS
</code
> notices from IRC Operators
.</td
>
165 elseif ($mode == "x")
170 <td
>Using a
hostmask (hiding their IP from non
-IRCops
).</td
>
174 elseif ($mode == "z")
180 <table
class="table-sm table-responsive caption-top table-hover">
184 $cipher = (isset($user->tls
->cipher
)) ? $user->tls
->cipher
: "";
185 echo htmlspecialchars($cipher);
189 <td
>Cert Fingerprint
</td
>
190 <td
><?php
echo (isset($user->tls
->certfp
)) ? "<code>".htmlspecialchars($user->tls
->certfp
)."</code>" : "<span class=\"rounded-pill badge badge-info\">None</span>"; ?></td
>
197 elseif ($mode == "B")
203 User is marked
as a Bot
.
208 elseif ($mode == "D")
214 User is rejecting incoming
private messages
.
219 elseif ($mode == "G")
225 User is filtering Bad Words
.
230 elseif ($mode == "H")
236 User is hiding their IRCop status
.
241 elseif ($mode == "I")
247 User is hiding their idle time
.
252 elseif ($mode == "R")
256 <th
>RegOnly Messages
</th
>
258 User is only accepting
private messages from registered users
.
263 elseif ($mode == "T")
269 Denying CTCP requests
.
274 elseif ($mode == "W")
280 User is receiving notifications when someone does a
<code
>/WHOIS
</code
> on them
.
285 elseif ($mode == "Z")
289 <th
>Deny Insecure Messages
</th
>
291 User is only accepting messages from users using a secure connection
.
307 function generate_html_userchannels($user)
311 <table
class="table-sm table-responsive caption-top table-hover table-striped">
312 <thead
class="table-info">
322 foreach($user->user
->channels
as $chan)
326 <td
><?php
echo "<a href=\"".get_config("base_url")."channels/details.php?chan=".urlencode($chan->name
)."\">$chan->name</a>"; ?></td
>
330 for ($i = 0; isset($chan->level
[$i]); $i++
)
332 ?><div
class="text-nowrap row mb-1"><?php
333 if ($chan->level
[$i] == "v")
335 ?><span
class="rounded-pill badge badge-info" value
="Voice">Voice
</span
><?php
337 if ($chan->level
[$i] == "h")
339 ?><span
class="rounded-pill badge badge-info">Half
-Op
</span
><?php
341 if ($chan->level
[$i] == "o")
343 ?><h6
><span
class="rounded-pill badge badge-info">Operator
</span
></h6
><?php
345 if ($chan->level
[$i] == "a")
347 ?><span
class="rounded-pill badge badge-info">Admin
</span
><?php
349 if ($chan->level
[$i] == "q")
351 ?><span
class="rounded-pill badge badge-info">Owner
</span
><?php
353 if ($chan->level
[$i] == "Y")
355 ?><span
class="rounded-pill badge badge-info">OJOIN
</span
><?php