if (!empty($_POST))
{
do_log($_POST);
-
+ $bantype = $_POST['bantype'];
if (isset($_POST['userch']))
{
foreach ($_POST["userch"] as $user)
$duration .= $banlen_h;
}
- $nick = $rpc->user()->get($user);
- if (!$nick)
+ $user = $rpc->user()->get($user);
+ if (!user)
{
Message::Fail("Could not find that user. Maybe they disconnected after you clicked this?");
return;
$msg_msg = ($duration == "0" || $duration == "0w0d0h") ? "permanently" : "for ".rpc_convert_duration_string($duration);
$reason = (isset($_POST['ban_reason'])) ? $_POST['ban_reason'] : "No reason";
if ($rpc->serverban()->add($user, $bantype, $duration, $reason))
- {
- $c = $nick->client;
- Message::Success($c->name . " (*@".$c->hostname.") has been $bantype" . "d $msg_msg: $reason");
- }
+ Message::Success($user->name . " (*@".$user->hostname.") has been $bantype" . "d $msg_msg: $reason");
}
}
}
$users = $rpc->user()->getAll();
?>
- <div id="Users" data-tab-content>
+<div id="Users">
<table class='users_filter'>
<th class="thuf">Filter by: </th>
<th>
- <form action="" method="post">
+ <form action="users.php" method="post">
Nick: <input name="uf_nick" id="uf_nick" type="text">
<input class="cute_button2" type="submit" value="Search">
</form>
<th>UID</th>
<th>Host / IP</th>
<th>Account</th>
- <th>Usermodes<a href="https://www.unrealircd.org/docs/User_modes" target="_blank">ℹ️</a></th>
+ <th>Usermodes <a href="https://www.unrealircd.org/docs/User_modes" target="_blank">ℹ️</a></th>
<th>Oper</th>
<th>Secure</th>
<th>Connected to</th>
<th>Reputation <a href="https://www.unrealircd.org/docs/Reputation_score" target="_blank">ℹ️</a></th>
- <form action="" method="post">
+ <form action="users.php" method="post">
<?php
foreach($users as $user)
{
<input class="cute_button" type="submit" value="Apply">
</form>
- </div></div>
+ </div
+</div>
<?php require_once 'footer.php'; ?>