mirror of
https://github.com/Xkeeper0/jul.git
synced 2025-05-19 00:30:21 -07:00
Convert more messages to use Discord reporting
This commit is contained in:
parent
57185f6cda
commit
325fbe2e95
@ -42,6 +42,7 @@ else if ($_POST['knockout'])
|
|||||||
echo "Delivered IP ban to {$uinfo['lastip']}.\n";
|
echo "Delivered IP ban to {$uinfo['lastip']}.\n";
|
||||||
|
|
||||||
xk_ircsend("1|". xk(8) . $uinfo['name'] . xk(7). " (IP " . xk(8) . $uinfo['lastip'] . xk(7) .") is the latest victim of the new EZ BAN button(tm).");
|
xk_ircsend("1|". xk(8) . $uinfo['name'] . xk(7). " (IP " . xk(8) . $uinfo['lastip'] . xk(7) .") is the latest victim of the new EZ BAN button(tm).");
|
||||||
|
report("super", "**" . $uinfo['name'] . "** (IP " . $uinfo['lastip'] .") is the latest victim of the new EZ BAN button(tm).");
|
||||||
|
|
||||||
echo "\n</div>".redirect("admin-slammer.php", 'the slammer (for another go)', 2);
|
echo "\n</div>".redirect("admin-slammer.php", 'the slammer (for another go)', 2);
|
||||||
die();
|
die();
|
||||||
|
@ -1335,6 +1335,17 @@ function addslashes_array($data) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function report($type, $msg) {
|
||||||
|
if (!function_exists('get_discord_webhook')) return;
|
||||||
|
|
||||||
|
$wh_url = get_discord_webhook($type, null);
|
||||||
|
|
||||||
|
if (!$wh_url) return;
|
||||||
|
|
||||||
|
discord_send($wh_url, $outdiscord);
|
||||||
|
}
|
||||||
|
|
||||||
// general purpose report function, now with discord!
|
// general purpose report function, now with discord!
|
||||||
function xk_ircout($type, $user, $in) {
|
function xk_ircout($type, $user, $in) {
|
||||||
|
|
||||||
@ -1377,8 +1388,8 @@ function addslashes_array($data) {
|
|||||||
|
|
||||||
// logic to decide where the message goes based on info provided
|
// logic to decide where the message goes based on info provided
|
||||||
if (!function_exists('get_discord_webhook')) return;
|
if (!function_exists('get_discord_webhook')) return;
|
||||||
|
|
||||||
$wh_url = get_discord_webhook($type, $user, $in);
|
$wh_url = get_discord_webhook($type, $in);
|
||||||
|
|
||||||
if (!$wh_url) return;
|
if (!$wh_url) return;
|
||||||
|
|
||||||
|
@ -40,11 +40,14 @@
|
|||||||
|
|
||||||
//if ($fails > 1)
|
//if ($fails > 1)
|
||||||
@xk_ircsend("102|". xk(14) ."Failed attempt". xk(8) ." #$fails ". xk(14) ."to log in as ". xk(8) . $username . xk(14) ." by IP ". xk(8) . $_SERVER['REMOTE_ADDR'] . xk(14) .".");
|
@xk_ircsend("102|". xk(14) ."Failed attempt". xk(8) ." #$fails ". xk(14) ."to log in as ". xk(8) . $username . xk(14) ." by IP ". xk(8) . $_SERVER['REMOTE_ADDR'] . xk(14) .".");
|
||||||
|
report("mod", "Failed attempt **#$fails** to log in as **$username** by IP " . $_SERVER['REMOTE_ADDR'] . ".");
|
||||||
|
|
||||||
if ($fails >= 5) {
|
if ($fails >= 5) {
|
||||||
$sql->query("INSERT INTO `ipbans` SET `ip` = '". $_SERVER['REMOTE_ADDR'] ."', `date` = '". ctime() ."', `reason` = 'Send e-mail for password recovery'");
|
$sql->query("INSERT INTO `ipbans` SET `ip` = '". $_SERVER['REMOTE_ADDR'] ."', `date` = '". ctime() ."', `reason` = 'Send e-mail for password recovery'");
|
||||||
@xk_ircsend("102|". xk(7) ."Auto-IP banned ". xk(8) . $_SERVER['REMOTE_ADDR'] . xk(7) ." for this.");
|
@xk_ircsend("102|". xk(7) ."Auto-IP banned ". xk(8) . $_SERVER['REMOTE_ADDR'] . xk(7) ." for this.");
|
||||||
|
report("mod", "Auto-IP banned " . $_SERVER['REMOTE_ADDR'] . "for this.");
|
||||||
@xk_ircsend("1|". xk(7) ."Auto-IP banned ". xk(8) . $_SERVER['REMOTE_ADDR'] . xk(7) ." for repeated failed logins.");
|
@xk_ircsend("1|". xk(7) ."Auto-IP banned ". xk(8) . $_SERVER['REMOTE_ADDR'] . xk(7) ." for repeated failed logins.");
|
||||||
|
report("super", "Auto-IP banned " . $_SERVER['REMOTE_ADDR'] . "for repeated failed logins.");
|
||||||
}
|
}
|
||||||
|
|
||||||
$msg = "Couldn't login. Either you didn't enter an existing username, or you haven't entered the right password for the username.";
|
$msg = "Couldn't login. Either you didn't enter an existing username, or you haven't entered the right password for the username.";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user