Page 1 of 1

[REJECTED] Let's add something simple to the chat filter

Posted: Sat Jul 06, 2013 8:22 am
by kroxic
IP addresses.

There is no reason anyone should be posting an IP in all chat unless they are advertising.
It is one of the easiest regex's ever.

Re: Let's add something simple to the chat filter

Posted: Sat Jul 06, 2013 8:40 am
by Wormoxide
Code: Select all
in.replaceall('\d\.\d\.\d\.\d\.\d', '***')
Done
[/color]

Re: Let's add something simple to the chat filter

Posted: Sat Jul 06, 2013 10:49 am
by cubeguy314
Wormoxide wrote:
Code: Select all
in.replaceall('\d\.\d\.\d\.\d\.\d', 'No advertising allowed')
Done
[/color]
Altered some text.

Re: Let's add something simple to the chat filter

Posted: Sat Jul 06, 2013 12:38 pm
by jackavsfan
cubeguy314 wrote:
Wormoxide wrote:
Code: Select all
in.replaceall('\d\.\d\.\d\.\d\.\d', 'No advertising allowed')
Done
[/color]
Altered some text.
That would make it look like the player is saying "No advertising allowed," instead of an IP address. Maybe that's what you intended but it would be a little strange versus just replacing it with "****" like we do with censored words.

Re: Let's add something simple to the chat filter

Posted: Sat Jul 06, 2013 1:21 pm
by Skylord_Fox
The player should be told "No advertizing allowed." upon doing so.

Re: Let's add something simple to the chat filter

Posted: Sat Jul 06, 2013 3:48 pm
by MEMYYSELFANDME!!
I am not sure if this could be coded, but I think it could be as good as your suggestion kroxic. What could be done is have the advertising work just like if a person swears. If a player says an ip, which would be censored like a swear word, helpbot would give them the message " <username> if you advertise again you will be banned." Since advertising isn't inappropriate language on the server and more of a bannable offense, I think this would be a better compromise for it. This would be similar to your suggestion, but a little tweaked.