Server IP chat filter

Does anybody have a Chat IP filter that I could possibly have?

And what exactly does a server IP chat filter do

Are you looking when a player says an IP, it filters it? ( To avoid server to server advertising purposes )

Yes, exactly what I am looking for

Do you feel insecure that people will find that server more fun than yours ? I think you should just ban them if you’re not okay with it.

Would go ahead and code it myself but it’s too late, will look into it tomorrow.

Well, we don’t want people advertising in our server, plus, we don’t want people to be pasting IPs of anybody else for any reason, anyway.

[lua]
local fuck = “(%d+%.%d+%.%d+%.%d+)”

hook.Add( “PlayerSay”, “Filter IPs”, function( ply, text )

text = string.gsub( text, fuck, "x.x.x.x" )
return text

end )[/lua]

Thank you :wink:

Here’s my alternative

[lua]
local fuck = “%d+.%…%d+.%…%d+.%…%d+”

hook.Add( “PlayerSay”, “Filter IPs”, function( ply, text )

text = string.gsub( text, fuck, "x.x.x.x" )
return text

end )
[/lua]

The benefit with mine is that it’ll catch IP octets between different strings of text

And where exactly do you put this?

You can also just use URL’s, you gonna filter them too? :v:

(pathetic thread)

Init.lua or any server file

Could add a database of strings to filter out and add a command to add strings on the fly so that when someone advertises, an operator can then add it to the filterlist.