AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [ANY] IP Chat Block (https://forums.alliedmods.net/showthread.php?t=147987)

SuperRaWR 01-16-2011 16:58

[ANY] IP Chat Block
 
2 Attachment(s)
This plugin will block any message sent from a player that attempts to put an IP address in the text chat. This should help ensure that people aren't trying to steal your players, for example:
"hey guys, come join my server 216.18.203.226:27050"

You can whitelist certain IP address's by adding them to the file "sourcemod\configs\ipcb_whitelist.txt"


Installation Instructions:

ipchatblock.smx in your plugins folder,
ipchatblock.sp in your scripting folder,
and ipcb_whitelist.txt in your sourcemod\configs folder.

ipcb_whitelist.txt is only necessary if you want to have whitelisted IP addresses.

Commands:

sm_ipchatblock_reload
Reloads the whitelist file. If you've made any changes to the whitelist, or just added it, you will have to run this command to apply the changes.

cVars:

sm_ipchatblock_enabled
Default Value: 1 (Enabled)
Enables or disables the plugin.


Changelog:

Code:

Version 1.4: January 28th, 2011
*Allows Admins to say an IP in text chat.
*Fixed issue with the plugin not working if the whitelist file was not present.
*Fixed issue while trying to reload the whitelist if the file was just added, but didn't exist prior to the reload.


Version 1.3: January 17th, 2011
*Added a whitelist in key values format in order to allow certain IP's to be in the chat.
*Slight optimization using a pre-comiled regex for IP detection.

Version 1.2: January 16th, 2011
*Blocks all messages containing an IP, even if a port number isn't appended to the IP.

Version 1.1: January 16th, 2011
*Added a cvar to enable and disable the plugin.

Version 1.0: January 16th, 2011
* Initial Release.

This is my first public plugin on Allied Modders, and I look forward to making more simple plugins like this until I become more familiar with Sourcemod.

This was requested by Minimoney1 in IRC. :)
Thanks to DarthNinja for the idea to add a whitelist! :)
Thanks to _1Swatty for helping me clean up some code. :)

xomp 01-16-2011 17:50

Re: IP Chat Block
 
Thanks for this!

DarthNinja 01-16-2011 18:02

Re: IP Chat Block
 
It would be nice if you added an IP whitelist, for IPs that should not be blocked/filtered.

sinblaster 01-16-2011 19:25

Re: IP Chat Block
 
This is a great idea thanks. Having a whitelist would be great as mentioned above. Thanks heaps

SuperRaWR 01-16-2011 19:40

Re: IP Chat Block
 
Quote:

Originally Posted by DarthNinja (Post 1395104)
It would be nice if you added an IP whitelist, for IPs that should not be blocked/filtered.

I will add this soon. I haven't worked with key values before, and this is my first plugin release... but I'm reading up on them now.

SuperRaWR 01-17-2011 02:37

Re: IP Chat Block
 
Added whitelist functionality, so you can whitelist certain addresses that you want people to be able to talk about.

+ Learnt a lot about parsing key values and trie's.

Sandfly 01-17-2011 02:44

Re: IP Chat Block
 
SuperRaWR,

You are to be commended for this.

The whitelist is very good for advertising a community's server IP's in case of a community of friendly / allowed IP event, but the premise behind blocking player stealing is very good, and well done on this effort.

Can any function be built into this plugin, that might circumvent certain strings of IP and various ways that offenders might try to bypass the usual IP string .. i.e. instead of say 203.21.345.117, what if they used underscore or star symbol etc so it might look like 203_21_345_117 or 203*21*345*117 ... you get the idea?

It's just a thought, because minges will always try to circumvent security, and if something could be built into this plugin that would contain or allow the server Admin to select strings or combinations of an IP that could possibly be imagined, or respond to any IP string seen in server to bypass this, it could be then included in a blacklist of designs for IP addresses?

Just some food for thought on what possibilities might be built into a very good first effort for a plugin.

SuperRaWR 01-17-2011 03:19

Re: IP Chat Block
 
Quote:

Originally Posted by Sandfly (Post 1395291)
SuperRaWR,

You are to be commended for this.

The whitelist is very good for advertising a community's server IP's in case of a community of friendly / allowed IP event, but the premise behind blocking player stealing is very good, and well done on this effort.

Thank-you, I appreciate it!

Quote:

Originally Posted by Sandfly (Post 1395291)
Can any function be built into this plugin, that might circumvent certain strings of IP and various ways that offenders might try to bypass the usual IP string .. i.e. instead of say 203.21.345.117, what if they used underscore or star symbol etc so it might look like 203_21_345_117 or 203*21*345*117 ... you get the idea?

It's just a thought, because minges will always try to circumvent security, and if something could be built into this plugin that would contain or allow the server Admin to select strings or combinations of an IP that could possibly be imagined, or respond to any IP string seen in server to bypass this, it could be then included in a blacklist of designs for IP addresses?

I could add a few more regex checks similar to that if you would like, however I'm not too sure about adding a way for an admin to define additional regexs' to check for, it's much cleaner to hard-code a few common possibilities imo.

xxx_xx_xxx_xxx
xxx*xx*xxx*xxx
xxx-xx-xxx-xxx
xxx,xx,xxx,xxx

etc... I will add this at a later time.

Sir Jake 01-17-2011 04:36

Re: IP Chat Block
 
Think the main thing is blocking the real ip way as players want to just copy paste and join if given an ip address.

This looks like a great mod that many have wanted forever.
A suggestion that I have is if a person has a admin flag let them put in an ip address.
Had an example tonight of a member showing us a server with Saxton hale. If we had it he could not have posted it.

Thanks.

sinblaster 01-17-2011 09:13

Re: IP Chat Block
 
Quote:

Originally Posted by SuperRaWR (Post 1395288)
Added whitelist functionality, so you can whitelist certain addresses that you want people to be able to talk about.

+ Learnt a lot about parsing key values and trie's.


you've done really well, thanks mate!


All times are GMT -4. The time now is 04:39.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.