![]() |
Notification when members in a particular usergroup come online
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. |
Cool hack, got yourself an install.
|
cool hack :devious:
|
Is there any reason why this would not be compatible with 3.6?
|
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. |
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 ################################################# |
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. |
well anybody?
|
Quote:
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! |
All times are GMT. The time now is 04:55 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|