import legacy codebase
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user