Raised This Month: $12 Target: $400
 3% 

REGEX Word Filter


Post New Thread Reply   
 
Thread Tools Display Modes
SteamKiller
Member
Join Date: Jul 2010
Old 10-05-2010 , 07:43   Re: REGEX Word Filter
Reply With Quote #31

Do this plugin a check if chat message come from a real player or advertisements plugin? Because I use the advertisements plugin for post my server's forum address, but do not want players to be able to publish their own advertisements in chat in the form of URL, IP or e-mail.
__________________
I'm happy by default, please do not touch my settings...
SteamKiller is offline
Atreus
SourceMod Donor
Join Date: Apr 2005
Location: San Diego, CA
Old 11-02-2010 , 06:56   Re: REGEX Word Filter
Reply With Quote #32

It works based around say/sayteam, so yeah it will work fine with your advertisements.
Atreus is offline
Send a message via AIM to Atreus Send a message via MSN to Atreus
SteamKiller
Member
Join Date: Jul 2010
Old 11-05-2010 , 16:19   Re: REGEX Word Filter
Reply With Quote #33

Quote:
Originally Posted by Atreus View Post
It works based around say/sayteam, so yeah it will work fine with your advertisements.
Unfortunately it doesn't
In console I see my IP is slapped when it tries to chat any IP and no messaje appears in chat area. I did not found in source code where it makes difference between real players and game plugins typing text in chat...
__________________
I'm happy by default, please do not touch my settings...

Last edited by SteamKiller; 11-05-2010 at 16:21.
SteamKiller is offline
DontWannaName
Veteran Member
Join Date: Jun 2007
Location: VALVe Land, WA
Old 11-06-2010 , 02:54   Re: REGEX Word Filter
Reply With Quote #34

Server chat I believe use the server client which is client 0. Make an if client = 0 then ignore checking for banned words.
__________________

DontWannaName is offline
Atreus
SourceMod Donor
Join Date: Apr 2005
Location: San Diego, CA
Old 11-06-2010 , 11:13   Re: REGEX Word Filter
Reply With Quote #35

Quote:
Originally Posted by SteamKiller View Post
Unfortunately it doesn't
In console I see my IP is slapped when it tries to chat any IP and no messaje appears in chat area. I did not found in source code where it makes difference between real players and game plugins typing text in chat...
Well, yeah - if it's TALKING in chat, it's going to catch it. I thought you meant, like, PrintToChatAll type stuff lke tsunami's ads use :/
Atreus is offline
Send a message via AIM to Atreus Send a message via MSN to Atreus
SteamKiller
Member
Join Date: Jul 2010
Old 11-08-2010 , 11:15   Re: REGEX Word Filter
Reply With Quote #36

Quote:
Originally Posted by Atreus View Post
Well, yeah - if it's TALKING in chat, it's going to catch it. I thought you meant, like, PrintToChatAll type stuff lke tsunami's ads use :/
To be sure I'll be properly understood:

1. I do use Dj Tsunami's advertisements plugin;
2. I want server-side plugins can talk in chat everything, absolutely no filtering;
3. I do not want that people, including admins, be able to print in chat any IP, e-mail or URL.

I'm not familiar enough with programming to solve this problem alone
__________________
I'm happy by default, please do not touch my settings...
SteamKiller is offline
DarthNinja
SourceMod Plugin Approver
Join Date: Mar 2009
Location: PreThinkHook()
Old 11-09-2010 , 01:21   Re: REGEX Word Filter
Reply With Quote #37

Quote:
Originally Posted by SteamKiller View Post
I'm not familiar enough with programming to solve this problem alone
Sounds like a great opportunity to learn!
__________________
DarthNinja is offline
SteamKiller
Member
Join Date: Jul 2010
Old 11-09-2010 , 09:44   Re: REGEX Word Filter
Reply With Quote #38

Quote:
Originally Posted by DarthNinja View Post
Sounds like a great opportunity to learn!
Any tips or hints? Other plugins was much easier to modify, but this one turns my head in a brick Really, I don't realise how to change it like I posted in #36...
__________________
I'm happy by default, please do not touch my settings...
SteamKiller is offline
DarthNinja
SourceMod Plugin Approver
Join Date: Mar 2009
Location: PreThinkHook()
Old 11-09-2010 , 23:56   Re: REGEX Word Filter
Reply With Quote #39

Quote:
Originally Posted by SteamKiller View Post
To be sure I'll be properly understood:
1. I do use Dj Tsunami's advertisements plugin;
2. I want server-side plugins can talk in chat everything, absolutely no filtering;
3. I do not want that people, including admins, be able to print in chat any IP, e-mail or URL.
I'm not familiar enough with programming to solve this problem alone
  1. This will not filter advertisements because they use PrintToChat. This plugin looks at say/say_team.
  2. If they are correctly written, they will use PrintToChat/PrintToChatAll and this will not be an issue.
  3. I don't see the problem.

The plugin does not seem to check if the client is the server (for rcon say, HLSW, etc). You can fix that by adding this:
PHP Code:
    if (client == 0)
    {
        return 
Plugin_Continue;
    } 
To line 83~

If the chat is from the server console (rcon), it will not filter it.
__________________
DarthNinja is offline
janpepu
AlliedModders Donor
Join Date: Sep 2007
Location: france
Old 12-16-2010 , 16:13   Re: REGEX Word Filter
Reply With Quote #40

hi all

Someone can modify this regex to detect ip in chat?
Code:
"IPfilter"
    {
        "chatpattern"        "\d{1,3}.\d{1,3}.\d{1,3}.\d{1,3}:?\d*"
        "replace"        "my ip is private"
        "warn"            "no ip in chat"
            }
is detected:
Code:
lol fan<3<3<3<3
2222222222222222222222222
jtj?647d4787rdgdfdjgdrg4tr'
9-9-9-2 ^^
1y1y1y1y1y1ű
top 100000000
voteban ^2j0j0^4=7...
58555555555555555555555654785589577
o0o0o0o0o
And more

Someone can make a regex for url ?

THx

Last edited by janpepu; 12-16-2010 at 18:01.
janpepu is offline
Reply



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 20:57.


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