[2.0.20] MOD Troll

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in here. No new MODs will be accepted into the MOD Database for phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.

Rating:

Excellent!
30
77%
Very Good
2
5%
Good
3
8%
Fair
1
3%
Poor
3
8%
 
Total votes: 39

User avatar
M.O.B.
Registered User
Posts: 927
Joined: Tue Jan 04, 2005 1:07 am
Location: San Diego CA USA
Contact:

Re: [2.0.20] MOD Troll

Post by M.O.B. » Wed Mar 05, 2008 6:28 pm

I'm sorry but that would be a bit over my head. If you do find the time to test this for us, I know I would be very appreciative. Or hopefully someone else with an expert mind for php coding can assist us with this.
Image

Merlin Sythove
Registered User
Posts: 2339
Joined: Tue Mar 16, 2004 7:42 am

Re: [2.0.20] MOD Troll

Post by Merlin Sythove » Wed Mar 05, 2008 6:50 pm

I just tested it here and it works fine.

In the file includes/functions_post.php, find this line:
function submit_post($mode ....
and then find this line
//END MOD troll
and PM me everything between those lines, including those lines, in a code block. I'll see if I can figure out why it doesn't work for you.
Need custom work done? Pimp My Forum!

User avatar
M.O.B.
Registered User
Posts: 927
Joined: Tue Jan 04, 2005 1:07 am
Location: San Diego CA USA
Contact:

Re: [2.0.20] MOD Troll

Post by M.O.B. » Wed Mar 05, 2008 7:22 pm

Merlin Sythove wrote:I just tested it here and it works fine.

In the file includes/functions_post.php, find this line:
function submit_post($mode ....
and then find this line
//END MOD troll
and PM me everything between those lines, including those lines, in a code block. I'll see if I can figure out why it doesn't work for you.
Thanks for helping me with this. Here it goes:

Code: Select all

function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_id, &$post_id, &$poll_id, &$topic_type, &$bbcode_on, &$html_on, &$smilies_on, &$attach_sig, &$bbcode_uid, $post_username, $post_subject, $post_message, $poll_title, &$poll_options, &$poll_length, &$post_flagged)
{
	global $board_config, $lang, $db, $phpbb_root_path, $phpEx;
	global $userdata, $user_ip;


/*----------------------------------------------------------------------
// Subject Check - Begin Code Alteration
//		Original phpBB Code:
	include($phpbb_root_path . 'includes/functions_search.'.$phpEx);
*/
	include_once($phpbb_root_path . 'includes/functions_search.'.$phpEx);
//
// Subject Check - End Code Alteration
//----------------------------------------------------------------------



	$current_time = time();
	$post_flagged = (empty($post_flagged)) ? 0 : 1;


	//
	// Exclamation points in title
	//
	$post_subject = preg_replace("/([\!])+/", "\\1", $post_subject);
	$post_subject = preg_replace("/([\?])+/", "\\1", $post_subject); 

	if ($mode == 'newtopic' || $mode == 'reply' || $mode == 'editpost') 
	{

        //START MOD troll
        if ($userdata['user_troll'])
        {
//mail ( string $to , string $subject , string $message [, string $additional_headers [, string $additional_parameters ]] )
mail ($board_config['board_email'], "Troll posting by $post_username",
               "Dear forum administrator,\n\n\
               A troll user has just tried to post this message:\n\n
               Subject: $post_subject \n\n
               $post_message\n\n
               Note: this post is NOT posted on the forum.");

                switch (rand (1,2)) //case 3 is done by miserable_user.php
                {
                case 1: //Give obfuscating message
                        message_die(GENERAL_MESSAGE, $lang['Troll_error_posting_' . rand (1,3) ]);
                        break;
                case 2: //Pretend it worked
                        $meta = '<meta http-equiv="refresh" content="3;url=' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=" . $post_id) . '#' . $post_id . '">';
                //MOD Moderate_user
                        $message = $lang['Stored'];
                        if ($post_moderated) $message .= '<br />' .  $lang['moderate_user_notify'];
                                $message .= '<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>');
                                message_die(GENERAL_MESSAGE, $message);
                        break;
                case 3: //Abort further processing, computer "hangs"
                        exit;
                        break;

                }
        }
        //END MOD troll   
Image

Merlin Sythove
Registered User
Posts: 2339
Joined: Tue Mar 16, 2004 7:42 am

Re: [2.0.20] MOD Troll

Post by Merlin Sythove » Wed Mar 05, 2008 7:33 pm

Nothing wrong with the code. Figuring out what may be wrong may be quite a lengthy process, all I can think of is that the troll flag for that user is not set properly, you can test that by changing
if ($userdata['user_troll'])
to
//if ($userdata['user_troll'])

and posting something, and seeing if you get an email. And then restoring the line again of course.
Need custom work done? Pimp My Forum!

User avatar
M.O.B.
Registered User
Posts: 927
Joined: Tue Jan 04, 2005 1:07 am
Location: San Diego CA USA
Contact:

Re: [2.0.20] MOD Troll

Post by M.O.B. » Wed Mar 05, 2008 7:41 pm

But wouldn't that disable the Troll MOD? Could you provide me a copy of your functions_post.php file (just the same section as above) so I can compare it with mine? Thanks in advance.
Image

Asbestos
Registered User
Posts: 26
Joined: Wed Nov 08, 2006 7:40 pm
Location: GA
Contact:

Re: [2.0.20] MOD Troll

Post by Asbestos » Thu May 15, 2008 11:34 pm

Wow, this mod is totally annoying. I made a test account and set it as a troll user. After 1 minute of trying to log in, finally getting logged in, then being logged out by clicking on a topic, I gave up.

Great job guys! This mod will definitely come into good use!

Thanks again

Merlin Sythove
Registered User
Posts: 2339
Joined: Tue Mar 16, 2004 7:42 am

Re: [2.0.20] MOD Troll

Post by Merlin Sythove » Fri May 16, 2008 5:27 am

Need therapy now? :lol:

Glad you enjoyed it!
Need custom work done? Pimp My Forum!

mk264
Registered User
Posts: 11
Joined: Mon Jan 22, 2007 3:24 am
Contact:

Re: [2.0.20] MOD Troll

Post by mk264 » Thu Jun 12, 2008 7:09 pm

Can anyone help? I am getting a blank white page with this mod on phpbb 20.0.22

I installed everything including the database command.

Then the blank page came when i visited the forum. I then replaced each file one at a time and the forum come back up once the sessions.php file was replaced. Im assuming then that the sessions.php file is causing the problem and the blank page on my forum.

Any ideas?

Merlin Sythove
Registered User
Posts: 2339
Joined: Tue Mar 16, 2004 7:42 am

Re: [2.0.20] MOD Troll

Post by Merlin Sythove » Fri Jun 13, 2008 5:55 am

You're the troll? :lol:

Carefully check if you made any mistakes in sessions.php.
Need custom work done? Pimp My Forum!

clyde4210
Registered User
Posts: 14
Joined: Sat Oct 20, 2007 7:31 pm
Contact:

Re: [2.0.20] MOD Troll

Post by clyde4210 » Mon Jul 14, 2008 8:18 pm

why not just ban the user?, as this is basically all this acts like.

raqman
Registered User
Posts: 51
Joined: Tue Jul 23, 2002 4:03 pm
Contact:

Re: [2.0.20] MOD Troll

Post by raqman » Fri Oct 24, 2008 1:59 pm

Because if you simply ban a user, he will register again. Using this, most users give up, or re resgister and get trolled again.

However I have been using this mod for sometime now on phpbb2 and it was brilliant, but it seems with the advent of Chrome and all the new browsers privacy settings, users are able to bypass this or am I wrong.

Merlin Sythove
Registered User
Posts: 2339
Joined: Tue Mar 16, 2004 7:42 am

Re: [2.0.20] MOD Troll

Post by Merlin Sythove » Fri Oct 24, 2008 2:03 pm

You can easily check if a troll is actually making posts.
Need custom work done? Pimp My Forum!

internetbrother
Registered User
Posts: 230
Joined: Mon Mar 28, 2005 6:30 pm

Re: [2.0.20] MOD Troll

Post by internetbrother » Tue Nov 04, 2008 5:06 pm

What if I want to chage some options in there
for example how many second time out and bla bla
what file should i modify?

Merlin Sythove
Registered User
Posts: 2339
Joined: Tue Mar 16, 2004 7:42 am

Re: [2.0.20] MOD Troll

Post by Merlin Sythove » Tue Nov 04, 2008 6:28 pm

miserable_user.php
Need custom work done? Pimp My Forum!

internetbrother
Registered User
Posts: 230
Joined: Mon Mar 28, 2005 6:30 pm

Re: [2.0.20] MOD Troll

Post by internetbrother » Wed Nov 05, 2008 12:21 am

Thank you for your reply , the problem is that I do not know how to configure it to make it less
See I want the user have about 30% chance to post or send topic
It seems this way sooner or later they will find out and that is what I do not want.

Post Reply

Return to “[2.0.x] MOD Database Releases”