Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
Notification when members in a particular usergroup come online Details »»
Notification when members in a particular usergroup come online
Version: 1.00, by John Stone John Stone is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: 3.0.7 Rating:
Released: 03-18-2005 Last Update: Never Installs: 7
 
No support by the author.

A little background about this hack....

I don't ban users using vB's built-in functionality; instead, I block IPs/subnets by placing rules in my server's iptables configuration so that banned users can't even see the forum or my website. Additionally, I place banned (firewalled) users in a special usergroup I made called "firewalled". If someone in the "firewalled" usergroup gets by my firewall by using a non-blocked IP address, I let that user think s/he got one by me, and allow them to view the forum (but I don't allow posting, PMing or modification to user options). The reason I allow the banned user to view the forum for a short time is so that I can get the new IP and add it (or a subnet) to the firewall's rules.

The problem is, I'm not always online to catch people who get by my firewall and, of course, I can't remember all the users that have been banned. I wrote this little hack so that if a user in my "firewalled" usergroup comes online, it emails me the user name and the IP address. I can then add the IP to my firewall rules and block the user again. This hack works great with Logician's hack that disallows a particular usergroup to log out. It's not a perfect system, but it's pretty darn effective.

This hack could be used in other scenarios. Let's say you have a few users you want to keep an eye on. You could create a special user group for those users, and this hack will email you immediately if one of them comes online. Obviously you could easily send the notification to a pager or cell phone, too.

I have it set so that only one notification is sent per user session. If the user's cookie times out and s/he comes back on, you'll get another notification.

This is a really simple hack. If you can copy and paste, then you have the skills required to install it. :nervous:

Tested with vB 3.07.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 03-19-2005, 03:52 PM
Deaths Deaths is offline
 
Join Date: Oct 2004
Location: Europe, Belgium
Posts: 679
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Cool hack, got yourself an install.
Reply With Quote
  #3  
Old 03-19-2005, 03:55 PM
KanyeWest's Avatar
KanyeWest KanyeWest is offline
 
Join Date: Dec 2004
Location: Mohegan Lake Ny
Posts: 102
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

cool hack :devious:
Reply With Quote
  #4  
Old 01-07-2007, 03:16 AM
WATRD WATRD is offline
 
Join Date: Aug 2006
Posts: 45
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there any reason why this would not be compatible with 3.6?
Reply With Quote
  #5  
Old 01-07-2007, 03:30 AM
WATRD WATRD is offline
 
Join Date: Aug 2006
Posts: 45
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmm... okay, there is no "includes/sessions.php" that I can find in 3.6

So, any suggestions from anyone more knowledgeable than me in this stuff? This would be a handy mod to have.
Reply With Quote
  #6  
Old 01-07-2007, 12:41 PM
John Stone's Avatar
John Stone John Stone is offline
 
Join Date: May 2004
Location: Orlando, FL
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi WATRD,

I've not officially updated this hack because I've not had any time to mess with it or even learn the vB hooks system. However I did quickly get it working with vB 3.6x with few modifications.

One caveat: The place where this is hack is inserted into the vB code will email you each time the user does something on your forum. That's annoying. There is certainly a much better place to insert the code so that it will only email once per user session, which is how my original hack worked. I have not had time to locate the ideal location, so if anyone reading this wants to chime in, I'm all ears.

-------------

This will work with vB 3.6x, keeping the above caveat in mind:

On the line userinfo['usergroupid']==X, "X" should be replaced with the user group ID you want flagged.
On the line $emailaddr = "REPLACE WITH YOUR EMAIL ADDRESS"; add your email address where indicated.


In "includes/functions.php", look for:

$vbulletin->session->save();
... and insert this immediately after:

Code:
// ### EMAIL ADMIN IF FLAGGED USER COMES ONLINE - JOHN STONE HACK #################################################
$emailaddr = "REPLACE WITH YOUR EMAIL ADDRESS";
$ip = getenv("REMOTE_ADDR");
$user = ($vbulletin->userinfo['username']);
$subject = "Flagged user online!";
$message = "User: $user \nIP address: $ip";
if ($vbulletin->userinfo['usergroupid']==X)
{ // Flagged user
vbmail ($emailaddr, $subject, $message);
vbmail_end();
}
// ### EMAIL ADMIN IF FLAGGED USER COMES ONLINE - JOHN STONE HACK #################################################
I hope this helps. I'll post an official hack if I have time to make it work as intended with vB 3.6x, or if someone provides a better place to insert the code.
Reply With Quote
  #7  
Old 01-07-2007, 01:48 PM
WATRD WATRD is offline
 
Join Date: Aug 2006
Posts: 45
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you John! That DOES help. I want the hack for exactly the reasons you describe and have been looking for a way to not have to catch the person in the act.

For now, I will set up a mail filter to catch these mails and file them all away for me, but I will be interested if anyone spots a better place to install this.

Thank you for the response.
Reply With Quote
  #8  
Old 03-03-2007, 08:20 PM
daddygrim daddygrim is offline
 
Join Date: Mar 2006
Location: Northern Va
Posts: 353
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

well anybody?
Reply With Quote
  #9  
Old 06-30-2007, 06:11 PM
biggeorge's Avatar
biggeorge biggeorge is offline
 
Join Date: Feb 2007
Location: The Great State of Mass!
Posts: 116
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by John Stone View Post
Hi WATRD,

I've not officially updated this hack because I've not had any time to mess with it or even learn the vB hooks system. However I did quickly get it working with vB 3.6x with few modifications.

I hope this helps. I'll post an official hack if I have time to make it work as intended with vB 3.6x, or if someone provides a better place to insert the code.
Worked like a champ for me... 3.6.4

I will watch the IP's for about 1-month and then include the IP's in my FAVORITE hack... Miserable Users! I like them to suffer the agony of MU then have them blocked at the server level

Thank you!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:33 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04506 seconds
  • Memory Usage 2,279KB
  • Queries Executed 22 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (8)postbit
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete