Raised This Month: $7 Target: $400
 1% 

[ANY] IP Chat Block


Post New Thread Reply   
 
Thread Tools Display Modes
Author
SuperRaWR
SourceMod Donor
Join Date: Jan 2010
Location: Sylvan Lake, Alberta, Ca
Plugin ID:
2176
Plugin Version:
1.4
Plugin Category:
General Purpose
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    77 
    Plugin Description:
    Blocks people from posting an IP in text chat.
    Old 01-16-2011 , 16:58   [ANY] IP Chat Block
    Reply With Quote #1

    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.
    Attached Files
    File Type: txt ipcb_whitelist.txt (167 Bytes, 3851 views)
    File Type: sp Get Plugin or Get Source (ipchatblock.sp - 7338 views - 3.2 KB)
    __________________
    [WDZ]SuperRaWR

    I use event scripts.

    Last edited by SuperRaWR; 01-28-2011 at 19:32.
    SuperRaWR is offline
    Send a message via Skype™ to SuperRaWR
    xomp
    BANNED
    Join Date: Jul 2008
    Old 01-16-2011 , 17:50   Re: IP Chat Block
    Reply With Quote #2

    Thanks for this!
    xomp is offline
    Send a message via Skype™ to xomp
    DarthNinja
    SourceMod Plugin Approver
    Join Date: Mar 2009
    Location: PreThinkHook()
    Old 01-16-2011 , 18:02   Re: IP Chat Block
    Reply With Quote #3

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

    Last edited by psychonic; 01-16-2011 at 19:29. Reason: to edit!
    DarthNinja is offline
    sinblaster
    Grim Reaper
    Join Date: Feb 2010
    Location: Australia
    Old 01-16-2011 , 19:25   Re: IP Chat Block
    Reply With Quote #4

    This is a great idea thanks. Having a whitelist would be great as mentioned above. Thanks heaps
    __________________
    Happy Happy Joy Joy

    sinblaster is offline
    SuperRaWR
    SourceMod Donor
    Join Date: Jan 2010
    Location: Sylvan Lake, Alberta, Ca
    Old 01-16-2011 , 19:40   Re: IP Chat Block
    Reply With Quote #5

    Quote:
    Originally Posted by DarthNinja View Post
    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.
    __________________
    [WDZ]SuperRaWR

    I use event scripts.
    SuperRaWR is offline
    Send a message via Skype™ to SuperRaWR
    SuperRaWR
    SourceMod Donor
    Join Date: Jan 2010
    Location: Sylvan Lake, Alberta, Ca
    Old 01-17-2011 , 02:37   Re: IP Chat Block
    Reply With Quote #6

    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.
    __________________
    [WDZ]SuperRaWR

    I use event scripts.
    SuperRaWR is offline
    Send a message via Skype™ to SuperRaWR
    Sandfly
    Member
    Join Date: Dec 2009
    Location: Qld, Australia
    Old 01-17-2011 , 02:44   Re: IP Chat Block
    Reply With Quote #7

    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.
    __________________
    |IC| UltimateZombie: Reloaded - IP: 117.20.5.153:27015

    |IC| Ultra GunGame SM - IP: 117.20.5.153:27018

    Last edited by Sandfly; 01-17-2011 at 03:14.
    Sandfly is offline
    SuperRaWR
    SourceMod Donor
    Join Date: Jan 2010
    Location: Sylvan Lake, Alberta, Ca
    Old 01-17-2011 , 03:19   Re: IP Chat Block
    Reply With Quote #8

    Quote:
    Originally Posted by Sandfly View Post
    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 View Post
    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.
    __________________
    [WDZ]SuperRaWR

    I use event scripts.
    SuperRaWR is offline
    Send a message via Skype™ to SuperRaWR
    Sir Jake
    Senior Member
    Join Date: Jan 2009
    Old 01-17-2011 , 04:36   Re: IP Chat Block
    Reply With Quote #9

    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.
    Sir Jake is offline
    sinblaster
    Grim Reaper
    Join Date: Feb 2010
    Location: Australia
    Old 01-17-2011 , 09:13   Re: IP Chat Block
    Reply With Quote #10

    Quote:
    Originally Posted by SuperRaWR View Post
    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!
    __________________
    Happy Happy Joy Joy

    sinblaster is offline
    Reply


    Thread Tools
    Display Modes

    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 -4. The time now is 04:36.


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