BoA
05-27-2006, 06:00 AM
Hello,
I wish to install a phpBB Mod called "Cracker Trakcer" as my board always get's hacked...
I am the middle of installing but I am stuck on this line:
#
#-----[ FIND ]------------------------------------------
#
$meta = '<meta http-equiv="refresh" content="3;url=' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=" . $post_id) . '#' . $post_id . '">';
$message = $lang['Stored'] . '<br /><br />' . sprintf($lang['Click_view_message'], '<a href="' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=" . $post_id) . '#' . $post_id . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_forum'], '<a href="' . append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id") . '">', '</a>');
#
#-----[ BEFORE, ADD ]------------------------------------------
#
//
// CBACK CrackerTracker Spammer Protection Engine
//
$ctinfomeldung = '';
if(($mode == 'newtopic' || $mode == 'reply') and ($ctracker_config['floodprot'] == 1))
{
if($userdata['user_level'] == 0 && $userdata['user_id'] != ANONYMOUS)
{
if($userdata['ct_posttime'] >= time())
{
if($userdata['ct_postcount'] > $ctracker_config['postintime'])
{
if($ctracker_config['autoban'] == 1)
{
ct_filllog();
$sql = "INSERT INTO " . BANLIST_TABLE . "( `ban_id` , `ban_userid` , `ban_ip` , `ban_email` ) VALUES ('', '" . $userdata['user_id'] . "', '', NULL);";
if( !$db->sql_query($sql))
{
message_die(CRITICAL_ERROR, "Could not perform Database operation", "", __LINE__, __FILE__, $sql);
}
if( $userdata['session_logged_in'] )
{
session_end($userdata['session_id'], $userdata['user_id']);
}
}
else
{
ct_filllog();
$sql = "UPDATE " . USERS_TABLE . " SET user_active = 0 WHERE user_id = '" . $userdata['user_id'] . "'";
if( !$db->sql_query($sql))
{
message_die(CRITICAL_ERROR, "Could not perform Database operation", "", __LINE__, __FILE__, $sql);
}
if( $userdata['session_logged_in'] )
{
session_end($userdata['session_id'], $userdata['user_id']);
}
}
message_die(GENERAL_MESSAGE, $lang['ct_forum_blo']);
}
else if($userdata['ct_postcount'] == $ctracker_config['postintime'])
{
$ctinfomeldung = sprintf($lang['ct_forum_wa'] . '<br /><br />', $ctracker_config['posttimespan']);
}
else
{
$ctinfomeldung = '';
}
$sql = "UPDATE " . USERS_TABLE . " SET ct_postcount = ct_postcount + 1 WHERE user_id = '" . $userdata['user_id'] . "'";
if( !$db->sql_query($sql))
{
message_die(CRITICAL_ERROR, "Could not perform Database operation", "", __LINE__, __FILE__, $sql);
}
}
else
{
$stime = time() + $ctracker_config['posttimespan'];
$sql = "UPDATE " . USERS_TABLE . " SET ct_posttime = " . $stime . " WHERE user_id = '" . $userdata['user_id'] . "'";
if( !$db->sql_query($sql))
{
message_die(CRITICAL_ERROR, "Could not perform Database operation", "", __LINE__, __FILE__, $sql);
}
$sql = "UPDATE " . USERS_TABLE . " SET ct_postcount = 2 WHERE user_id = '" . $userdata['user_id'] . "'";
if( !$db->sql_query($sql))
{
message_die(CRITICAL_ERROR, "Could not perform Database operation", "", __LINE__, __FILE__, $sql);
}
}
}
}
This must be inserted into the file attached.
Any help would be greatly appreciated.
I wish to install a phpBB Mod called "Cracker Trakcer" as my board always get's hacked...
I am the middle of installing but I am stuck on this line:
#
#-----[ FIND ]------------------------------------------
#
$meta = '<meta http-equiv="refresh" content="3;url=' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=" . $post_id) . '#' . $post_id . '">';
$message = $lang['Stored'] . '<br /><br />' . sprintf($lang['Click_view_message'], '<a href="' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=" . $post_id) . '#' . $post_id . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_forum'], '<a href="' . append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id") . '">', '</a>');
#
#-----[ BEFORE, ADD ]------------------------------------------
#
//
// CBACK CrackerTracker Spammer Protection Engine
//
$ctinfomeldung = '';
if(($mode == 'newtopic' || $mode == 'reply') and ($ctracker_config['floodprot'] == 1))
{
if($userdata['user_level'] == 0 && $userdata['user_id'] != ANONYMOUS)
{
if($userdata['ct_posttime'] >= time())
{
if($userdata['ct_postcount'] > $ctracker_config['postintime'])
{
if($ctracker_config['autoban'] == 1)
{
ct_filllog();
$sql = "INSERT INTO " . BANLIST_TABLE . "( `ban_id` , `ban_userid` , `ban_ip` , `ban_email` ) VALUES ('', '" . $userdata['user_id'] . "', '', NULL);";
if( !$db->sql_query($sql))
{
message_die(CRITICAL_ERROR, "Could not perform Database operation", "", __LINE__, __FILE__, $sql);
}
if( $userdata['session_logged_in'] )
{
session_end($userdata['session_id'], $userdata['user_id']);
}
}
else
{
ct_filllog();
$sql = "UPDATE " . USERS_TABLE . " SET user_active = 0 WHERE user_id = '" . $userdata['user_id'] . "'";
if( !$db->sql_query($sql))
{
message_die(CRITICAL_ERROR, "Could not perform Database operation", "", __LINE__, __FILE__, $sql);
}
if( $userdata['session_logged_in'] )
{
session_end($userdata['session_id'], $userdata['user_id']);
}
}
message_die(GENERAL_MESSAGE, $lang['ct_forum_blo']);
}
else if($userdata['ct_postcount'] == $ctracker_config['postintime'])
{
$ctinfomeldung = sprintf($lang['ct_forum_wa'] . '<br /><br />', $ctracker_config['posttimespan']);
}
else
{
$ctinfomeldung = '';
}
$sql = "UPDATE " . USERS_TABLE . " SET ct_postcount = ct_postcount + 1 WHERE user_id = '" . $userdata['user_id'] . "'";
if( !$db->sql_query($sql))
{
message_die(CRITICAL_ERROR, "Could not perform Database operation", "", __LINE__, __FILE__, $sql);
}
}
else
{
$stime = time() + $ctracker_config['posttimespan'];
$sql = "UPDATE " . USERS_TABLE . " SET ct_posttime = " . $stime . " WHERE user_id = '" . $userdata['user_id'] . "'";
if( !$db->sql_query($sql))
{
message_die(CRITICAL_ERROR, "Could not perform Database operation", "", __LINE__, __FILE__, $sql);
}
$sql = "UPDATE " . USERS_TABLE . " SET ct_postcount = 2 WHERE user_id = '" . $userdata['user_id'] . "'";
if( !$db->sql_query($sql))
{
message_die(CRITICAL_ERROR, "Could not perform Database operation", "", __LINE__, __FILE__, $sql);
}
}
}
}
This must be inserted into the file attached.
Any help would be greatly appreciated.