import legacy codebase

This commit is contained in:
Aleksei Miheev
2024-11-23 15:09:46 +07:00
parent b1978dc5f9
commit 5f02930e37
13 changed files with 81 additions and 67 deletions

View File

@@ -315,6 +315,15 @@ function is_not_banned()
}
}
# check Tor: disallow registration
$res = db_query(
"select * from tor_nodes where ip='${user_info['ip']}'",
__FILE__, __LINE__
);
if (mysql_num_rows($res) > 0) {
$_SESSION['ban']['cannot_register']['is_banned'] = true;
}
// If you're fully banned, it's end of the story for you.
if ($_SESSION['ban']['full_ban']['is_banned'])
{
@@ -613,6 +622,7 @@ function allowedTo($permission, $boards = null)
return true;
// no more than 3 polls in 24 hours. moderators excluded
if (! isset($user_info['is_mod'])) $user_info['is_mod'] = false;
if (! $user_info['is_mod'] && in_array($permission, array ('poll_post', 'poll_add_own'))) {
$request = db_query("
SELECT COUNT(*) as recent_polls