mirror of
https://github.com/vichan-devel/vichan.git
synced 2025-01-31 12:23:48 +01:00
Merge branch 'master' of https://github.com/ctrlcctrlv/8chan
Conflicts: inc/image.php
This commit is contained in:
commit
3f7b37ce59
2
faq.php
2
faq.php
@ -11,7 +11,7 @@ $body = <<<EOT
|
||||
|
||||
<p>The largest board owners are promoted to Global Volunteers. This is devised by an algorithm, but volunteers are only promoted with my express approval.</p>
|
||||
|
||||
<p>All new global volunteers are sent a message congratulating them on becoming global volunteers and explaining the position. Gloval volunteers simply delete CP, excessive spam and other illegal content that comes on the server and ban the posting users and their IP ranges.</p>
|
||||
<p>All new global volunteers are sent a message congratulating them on becoming global volunteers and explaining the position. Global volunteers simply delete CP, excessive spam and other illegal content that comes on the server and ban the posting users and their IP ranges.</p>
|
||||
|
||||
<p>There is a large penalty for abusing their powers to ban users for other reasons. That penalty is that I will not only remove their global volunteer position, but also commandeer their board. I will then find another suitable owner for it among the board's users and give it to them.</p>
|
||||
|
||||
|
@ -2409,6 +2409,13 @@ function diceRoller($post) {
|
||||
|
||||
function less_ip($ip) {
|
||||
$ipv6 = (strstr($ip, ':') !== false);
|
||||
$has_range = (strstr($ip, '/') !== false);
|
||||
|
||||
if ($has_range) {
|
||||
$ip_a = explode('/', $ip);
|
||||
$ip = $ip_a[0];
|
||||
$range = $ip_a[1];
|
||||
}
|
||||
|
||||
$in_addr = inet_pton($ip);
|
||||
|
||||
@ -2420,7 +2427,7 @@ function less_ip($ip) {
|
||||
}
|
||||
|
||||
$final = inet_ntop($in_addr & $mask);
|
||||
return str_replace(array(':0', '.0'), array(':x', '.x'), $final);
|
||||
return str_replace(array(':0', '.0'), array(':x', '.x'), $final) . (isset($range) ? '/'.$range : '');
|
||||
}
|
||||
|
||||
function less_hostmask($hostmask) {
|
||||
|
@ -892,7 +892,7 @@ function mod_page_ip_less($b, $id) {
|
||||
|
||||
Bans::delete($_POST['ban_id'], true);
|
||||
|
||||
header('Location: ?/IP/' . $ip . '#bans', true, $config['redirect_http']);
|
||||
header('Location: ?/IP_less/' . $b . '/' . $id . '#bans', true, $config['redirect_http']);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -911,7 +911,7 @@ function mod_page_ip_less($b, $id) {
|
||||
|
||||
modLog("Added a note for <a href=\"?/IP/{$ip}\">{$ip}</a>");
|
||||
|
||||
header('Location: ?/IP/' . $ip . '#notes', true, $config['redirect_http']);
|
||||
header('Location: ?/IP_less/' . $b . '/' . $id . '#notes', true, $config['redirect_http']);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -926,7 +926,7 @@ function mod_page_ip_less($b, $id) {
|
||||
|
||||
$query = prepare(sprintf('SELECT * FROM ``posts_%s`` WHERE `ip` = :ip ORDER BY `sticky` DESC, `id` DESC LIMIT :limit', $b));
|
||||
$query->bindValue(':ip', $ip);
|
||||
$query->bindValue(':limit', $config['mod']['ip_recentposts'], PDO::PARAM_INT);
|
||||
$query->bindValue(':limit', $config['mod']['ip_less_recentposts'], PDO::PARAM_INT);
|
||||
$query->execute() or error(db_error($query));
|
||||
|
||||
while ($post = $query->fetch(PDO::FETCH_ASSOC)) {
|
||||
|
@ -103,7 +103,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{% trans 'IP' %}</th>
|
||||
<td>{{ ban.mask }}</td>
|
||||
<td>{{ ban.mask|less_ip }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{% trans 'Reason' %}</th>
|
||||
|
@ -1,4 +1,4 @@
|
||||
{% if config.poster_ids or mod %}
|
||||
{% if config.poster_ids or (mod|hasPermission(config.mod.show_ip_less, board.uri)) %}
|
||||
{% if post.thread %}
|
||||
ID: <span class="poster_id">{{ poster_id(post.ip, post.thread, board.uri) }}</span>
|
||||
{% else %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user