mirror of
https://github.com/Xkeeper0/jul.git
synced 2025-05-19 08:40:21 -07:00
Merge branch 'master' of github:Xkeeper0/jul
This commit is contained in:
commit
b51262be3d
@ -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();
|
||||||
|
@ -214,6 +214,7 @@
|
|||||||
$sex=2;
|
$sex=2;
|
||||||
|
|
||||||
$oldtitle = "";
|
$oldtitle = "";
|
||||||
|
$title = stripslashes($title);
|
||||||
while ($oldtitle != $title) {
|
while ($oldtitle != $title) {
|
||||||
$oldtitle = $title;
|
$oldtitle = $title;
|
||||||
$title=preg_replace("'<(b|i|u|s|small|br)>'si", '[\\1]', $title);
|
$title=preg_replace("'<(b|i|u|s|small|br)>'si", '[\\1]', $title);
|
||||||
@ -231,6 +232,8 @@
|
|||||||
$title=preg_replace("'(face|style|class|size|id)=\'([^ ].*?)\''si", '', $title);
|
$title=preg_replace("'(face|style|class|size|id)=\'([^ ].*?)\''si", '', $title);
|
||||||
$title=preg_replace("'(face|style|class|size|id)=([^ ].*?)'si", '', $title);
|
$title=preg_replace("'(face|style|class|size|id)=([^ ].*?)'si", '', $title);
|
||||||
}
|
}
|
||||||
|
$title = addslashes($title);
|
||||||
|
|
||||||
$bio=preg_replace("'<iframe'si", '<iframe', $bio);
|
$bio=preg_replace("'<iframe'si", '<iframe', $bio);
|
||||||
$bio=preg_replace("'<script'si", '<script', $bio);
|
$bio=preg_replace("'<script'si", '<script', $bio);
|
||||||
$bio=preg_replace("'onload'si", 'o<z>nload', $bio);
|
$bio=preg_replace("'onload'si", 'o<z>nload', $bio);
|
||||||
|
@ -69,7 +69,7 @@
|
|||||||
$cx = ($i) / 25 * 255;
|
$cx = ($i) / 25 * 255;
|
||||||
$cc = imagecolorallocate($image, 255, $cx, 0);
|
$cc = imagecolorallocate($image, 255, $cx, 0);
|
||||||
} elseif ($i <= 49) {
|
} elseif ($i <= 49) {
|
||||||
$cx = ($i - 75) / 25 * 127;
|
$cx = ($i - 25) / 25 * 127;
|
||||||
$cc = imagecolorallocate($image, 255 - $cx, 255 - $cx, $cx);
|
$cc = imagecolorallocate($image, 255 - $cx, 255 - $cx, $cx);
|
||||||
} elseif ($i <= 74) {
|
} elseif ($i <= 74) {
|
||||||
$cx = ($i - 50) / 25 * 31;
|
$cx = ($i - 50) / 25 * 31;
|
||||||
|
7
irc.php
7
irc.php
@ -9,9 +9,14 @@ require 'lib/layout.php';
|
|||||||
$servers[3] = "irc.tcrf.net";
|
$servers[3] = "irc.tcrf.net";
|
||||||
if ($server > count($servers) || $server <= -1) $server = 0;
|
if ($server > count($servers) || $server <= -1) $server = 0;
|
||||||
|
|
||||||
|
print "$header<br>";
|
||||||
|
|
||||||
|
print " $tblstart<tr>
|
||||||
|
$tccellh><b>Hold up, it's ". '$' ."YEAR.</b></td></tr>
|
||||||
|
<tr>$tccell1>Maybe you want to head straight for our <a href='/thread.php?id=17948'>Discord</a>?
|
||||||
|
$tblend";
|
||||||
|
|
||||||
print " $header<br>$tblstart<tr>
|
print "<br><br>$tblstart<tr>
|
||||||
$tccellh><b>IRC Chat - BadnikZONE, #tcrf, #x</b></td></tr>
|
$tccellh><b>IRC Chat - BadnikZONE, #tcrf, #x</b></td></tr>
|
||||||
<tr>$tccell1>Server List: ";
|
<tr>$tccell1>Server List: ";
|
||||||
|
|
||||||
|
@ -243,6 +243,9 @@
|
|||||||
$sql->query("UPDATE `users` SET `sex` = '22' WHERE `id` = 20"); #nicole
|
$sql->query("UPDATE `users` SET `sex` = '22' WHERE `id` = 20"); #nicole
|
||||||
$sql->query("UPDATE `users` SET `sex` = '23' WHERE `id` = 50"); #Rena
|
$sql->query("UPDATE `users` SET `sex` = '23' WHERE `id` = 50"); #Rena
|
||||||
$sql->query("UPDATE `users` SET `sex` = '24' WHERE `id` = 2069"); #Adelheid/Stark/etc.
|
$sql->query("UPDATE `users` SET `sex` = '24' WHERE `id` = 2069"); #Adelheid/Stark/etc.
|
||||||
|
// So I can switch between Schezo/Witch colors myself :D
|
||||||
|
$kakcol = filter_bool($_GET['witch_colors']) ? 96 : 25;
|
||||||
|
$sql->query("UPDATE `users` SET `sex` = '{$kakcol}' WHERE `id` = 2889"); #Kak
|
||||||
|
|
||||||
$sql->query("UPDATE `users` SET `name` = 'Xkeeper' WHERE `id` = 1"); #Xkeeper. (Change this and I WILL Z-Line you from Badnik for a week.)
|
$sql->query("UPDATE `users` SET `name` = 'Xkeeper' WHERE `id` = 1"); #Xkeeper. (Change this and I WILL Z-Line you from Badnik for a week.)
|
||||||
|
|
||||||
@ -880,6 +883,8 @@ function getnamecolor($sex, $powl, $prefix = true){
|
|||||||
$namecolor .= "77ECFF"; break;
|
$namecolor .= "77ECFF"; break;
|
||||||
case 24: // Adelheid
|
case 24: // Adelheid
|
||||||
$namecolor .= "D2A6E1"; break;
|
$namecolor .= "D2A6E1"; break;
|
||||||
|
case 25: // Kak - Schezo
|
||||||
|
$namecolor .= "D8E8FE"; break;
|
||||||
case 41:
|
case 41:
|
||||||
$namecolor .= "8a5231"; break;
|
$namecolor .= "8a5231"; break;
|
||||||
case 42:
|
case 42:
|
||||||
@ -890,6 +895,8 @@ function getnamecolor($sex, $powl, $prefix = true){
|
|||||||
$namecolor .= $nmcol[0][3]; break;
|
$namecolor .= $nmcol[0][3]; break;
|
||||||
case 97:
|
case 97:
|
||||||
$namecolor .= "6600DD"; break;
|
$namecolor .= "6600DD"; break;
|
||||||
|
case 96: // Kak - Witch
|
||||||
|
$namecolor .= $nmcol[2][3]; break; // Make it readable in case the user has a light theme
|
||||||
default:
|
default:
|
||||||
$namecolor .= $nmcol[$sex][$powl];
|
$namecolor .= $nmcol[$sex][$powl];
|
||||||
break;
|
break;
|
||||||
@ -1253,6 +1260,8 @@ function dofilters($p){
|
|||||||
//$p=preg_replace("'(https?://.*?photobucket.com/)'si",'images/photobucket.png#\\1',$p);
|
//$p=preg_replace("'(https?://.*?photobucket.com/)'si",'images/photobucket.png#\\1',$p);
|
||||||
$p=preg_replace("'http://.{0,3}\.?tinypic\.com'si",'tinyshit',$p);
|
$p=preg_replace("'http://.{0,3}\.?tinypic\.com'si",'tinyshit',$p);
|
||||||
$p=str_replace('<link href="http://pieguy1372.freeweb7.com/misc/piehills.css" rel="stylesheet">',"",$p);
|
$p=str_replace('<link href="http://pieguy1372.freeweb7.com/misc/piehills.css" rel="stylesheet">',"",$p);
|
||||||
|
$p=str_replace('yukina.io',"",$p); // hiryuu's domain, dead, css lags
|
||||||
|
$p=str_replace('safiria.net',"",$p);
|
||||||
$p=str_replace("tabindex=\"0\" ","title=\"the owner of this button is a fucking dumbass\" ",$p);
|
$p=str_replace("tabindex=\"0\" ","title=\"the owner of this button is a fucking dumbass\" ",$p);
|
||||||
|
|
||||||
// $p=str_replace("http://xkeeper.shacknet.nu:5/", 'http://xchan.shacknet.nu:5/', $p);
|
// $p=str_replace("http://xkeeper.shacknet.nu:5/", 'http://xchan.shacknet.nu:5/', $p);
|
||||||
@ -1329,6 +1338,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!
|
||||||
function xk_ircout($type, $user, $in) {
|
function xk_ircout($type, $user, $in) {
|
||||||
|
|
||||||
// gone
|
// gone
|
||||||
@ -1350,18 +1370,33 @@ function addslashes_array($data) {
|
|||||||
if ($in['pmatch'] >= 3) $color = array(7, 4);
|
if ($in['pmatch'] >= 3) $color = array(7, 4);
|
||||||
elseif ($in['pmatch'] >= 5) $color = array(4, 5);
|
elseif ($in['pmatch'] >= 5) $color = array(4, 5);
|
||||||
$extra = " (". xk($color[1]) ."Password matches: ". xk($color[0]) . $in['pmatch'] . xk() .")";
|
$extra = " (". xk($color[1]) ."Password matches: ". xk($color[0]) . $in['pmatch'] . xk() .")";
|
||||||
|
$extradiscord = " (**Password matches**: " . $in['pmatch'] . ")";
|
||||||
}
|
}
|
||||||
|
|
||||||
$out = "1|New user: #". xk(12) . $in['id'] . xk(11) ." $user ". xk() ."(IP: ". xk(12) . $in['ip'] . xk() .")$extra: https://jul.rustedlogic.net/?u=". $in['id'];
|
$out = "1|New user: #". xk(12) . $in['id'] . xk(11) ." $user ". xk() ."(IP: ". xk(12) . $in['ip'] . xk() .")$extra: https://jul.rustedlogic.net/?u=". $in['id'];
|
||||||
|
$outdiscord = "New user: **#" . $in['id'] . "** ". $user . " (IP: " . $in['ip'] . ")$extra: <https://jul.rustedlogic.net/?u=" . $in['id'] . ">";
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// global $sql;
|
// global $sql;
|
||||||
// $res = $sql -> resultq("SELECT COUNT(`id`) FROM `posts`");
|
// $res = $sql -> resultq("SELECT COUNT(`id`) FROM `posts`");
|
||||||
$out = "$dest|New $type by ". xk(11) . $user . xk() ." (". xk(12) . $in['forum'] .": ". xk(11) . $in['thread'] . xk() ."): https://jul.rustedlogic.net/?p=". $in['pid'];
|
$out = "$dest|New $type by ". xk(11) . $user . xk() ." (". xk(12) . $in['forum'] .": ". xk(11) . $in['thread'] . xk() ."): https://jul.rustedlogic.net/?p=". $in['pid'];
|
||||||
|
$outdiscord = "New $type by **" . $user . "** (" . $in['forum'] . ": **" . $in['thread'] . "**): <https://jul.rustedlogic.net/?p=". $in['pid'] . ">";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
xk_ircsend($out);
|
xk_ircsend($out);
|
||||||
|
|
||||||
|
// discord part
|
||||||
|
|
||||||
|
// logic to decide where the message goes based on info provided
|
||||||
|
if (!function_exists('get_discord_webhook')) return;
|
||||||
|
|
||||||
|
$wh_url = get_discord_webhook($type, $in);
|
||||||
|
|
||||||
|
if (!$wh_url) return;
|
||||||
|
|
||||||
|
discord_send($wh_url, $outdiscord);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function xk_ircsend($str) {
|
function xk_ircsend($str) {
|
||||||
@ -1380,6 +1415,28 @@ function addslashes_array($data) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function discord_send($url, $msg) {
|
||||||
|
// stripped down from https://gist.github.com/Mo45/cb0813cb8a6ebcd6524f6a36d4f8862c
|
||||||
|
$json_data = json_encode([
|
||||||
|
"content" => $msg
|
||||||
|
], JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
|
||||||
|
|
||||||
|
|
||||||
|
$ch = curl_init($url);
|
||||||
|
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: application/json'));
|
||||||
|
curl_setopt($ch, CURLOPT_POST, 1);
|
||||||
|
curl_setopt($ch, CURLOPT_POSTFIELDS, $json_data);
|
||||||
|
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
|
||||||
|
curl_setopt($ch, CURLOPT_HEADER, 0);
|
||||||
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||||
|
|
||||||
|
$response = curl_exec($ch);
|
||||||
|
// echo $response;
|
||||||
|
curl_close($ch);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
function xk($n = -1) {
|
function xk($n = -1) {
|
||||||
if ($n == -1) $k = "";
|
if ($n == -1) $k = "";
|
||||||
else $k = str_pad($n, 2, 0, STR_PAD_LEFT);
|
else $k = str_pad($n, 2, 0, STR_PAD_LEFT);
|
||||||
|
@ -530,7 +530,7 @@
|
|||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
Acmlmboard - <a href='https://github.com/Xkeeper0/jul'>". (file_exists('version.txt') ? file_get_contents("version.txt") : shell_exec("git log --format='commit %h [%ad]' --date='short' -n 1")) ."</a>
|
Acmlmboard - <a href='https://github.com/Xkeeper0/jul'>". (file_exists('version.txt') ? file_get_contents("version.txt") : shell_exec("git log --format='commit %h [%ad]' --date='short' -n 1")) ."</a>
|
||||||
<br>©2000-". date("Y") ." Acmlm, Xkeeper, Kaito Sinclaire, et al. $ikachan_text
|
<br>©2000-". date("Y") ." Acmlm, Xkeeper, et al. $ikachan_text
|
||||||
</font>
|
</font>
|
||||||
</td>
|
</td>
|
||||||
</tr></table>
|
</tr></table>
|
||||||
|
@ -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.";
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
$linkcolor4 = 'CCE8FF'; # Hover
|
$linkcolor4 = 'CCE8FF'; # Hover
|
||||||
|
|
||||||
$tableborder = '000011'; # Border color for tables
|
$tableborder = '000011'; # Border color for tables
|
||||||
$tableheadtext = '002549'; # Table header text color
|
$tableheadtext = 'bdd8f1'; # Table header text color
|
||||||
$tableheadbg = '000921'; # Table header background (you can use images)
|
$tableheadbg = '000921'; # Table header background (you can use images)
|
||||||
$categorybg = '002864'; # Category BG
|
$categorybg = '002864'; # Category BG
|
||||||
$tablebg1 = '001E4B'; # Table cell 1 background
|
$tablebg1 = '001E4B'; # Table cell 1 background
|
||||||
|
@ -4,7 +4,8 @@
|
|||||||
$formcss=1;
|
$formcss=1;
|
||||||
$inputborder='000000';
|
$inputborder='000000';
|
||||||
|
|
||||||
$bgcolor='010';
|
$bgcolor='010 linear-gradient(45deg, #001100 40%, #001600 40%, #001600 50%, #001100 50%, #001100 90%, #001600 90%, #001600 100%); background-size: 35.36px 35.36px';
|
||||||
|
$bgimage="";
|
||||||
$textcolor='DDDDDD';
|
$textcolor='DDDDDD';
|
||||||
|
|
||||||
$linkcolor ='BEFEBA';
|
$linkcolor ='BEFEBA';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user