[Feature Request] Message Filter

Developer discussion of experimental fixes, changes, and improvements.

Moderators: Nexuiz Moderators, Moderators

[Feature Request] Message Filter

Postby oz » Mon Dec 17, 2007 2:58 pm

I want messages (in the chat or event area) to be filtered on client side.

Best (and most difficult) would be to filter it by type:
Every output gets a type like "chat", "teamchat", "tell", "echo", "vote", "kill" or "score". The user can set local vars to control the output. For example like filter="vote,teamchat,tell,score" to set what to show or hide and filter_is_blacklist=1 to invert the matching.

Second best would be to filter by POSIX regular expression or simple string matching:
Again the user can set local vars to control the output. For example like filter="tells you|calls a vote|fragged" to set the pattern, filter_type="regexp" to select between possible types of matching and filter_invert=1 to invert matching.


There may be an alternative way to do that, if there would be a command to delay execution of an alias without blocking all other user commands.
If a command like that would be present, please tell me, because I could use it to start a self refernecing alias as a loop that dumps messages to be filtered by an external program. The external program could write a script echoing messages in a special way and the loop alias could execute this script.
Anyways, I am concerned about memory consumption of self referencing aliases; this seems to be recursive after all ...
oz
 

Postby [-z-] » Wed Dec 19, 2007 5:28 am

This would be a nice option to have.
[-z-]
Site Admin and Nexuiz Ninja
 
Posts: 1794
Joined: Mon Nov 13, 2006 12:20 am
Location: Florida

Postby divVerent » Wed Dec 19, 2007 7:54 am

Unfortunately very hard to do... the client does not know about message types. Basically, the only thing the client knows is whether the message starts with a beep character (chat) or not (regular game message). And RE filtering won't ever be able to filter absolutely right.

For example, if you match /.*killed.*/, you will also match all lines with a player name SkilledNoob. If you are more clever and match /\bkilled\b/, you'll match "Who killed who?".
1. Open Notepad
2. Paste: ÿþMSMSMS
3. Save
4. Open the file in Notepad again

You can vary the number of "MS", so you can clearly see it's MS which is causing it.
divVerent
Site admin and keyboard killer
 
Posts: 3809
Joined: Thu Mar 02, 2006 4:46 pm
Location: BRLOGENSHFEGLE

RE filter is better than nothing and may be easier to code

Postby oz » Sat Dec 22, 2007 2:00 am

divVerent, you are absolutely right, but RE filtering would be better than nothing. I rather get some false positives than all that other freaky stuff...

Some people really spam with team messages and if one starts a vote about that nobody else seems to care. Afterwards they start votes against the previous voter and say things like "F1 for god mode"... Sometimes people fall for that one... I just don't wanna know about his at all.

Other people always talk about how n00b everyone is and how everyone cheats or camps... blah. I don't want to read that all the time between the important messages, like votes.


Apropos: Is there a way to filter chat messages with iptables? Just an idea, tho.
oz
 

Postby [-z-] » Sat Dec 22, 2007 5:20 am

Yes, I don't care about false positives either. My spam filter isn't 100% accurate but that doesn't mean I'm going to stop using it. My inbox would cry.

On a side note, this got me thinking.

(12:16:24a) <@[-z-]> hey, I just had an idea
(12:16:38a) <@[-z-]> is there a way to trigger a timer on a votecall?
(12:16:47a) <@[-z-]> that is, if someone were to call a vote
(12:16:56a) <@[-z-]> can I have it vote no automatically in 5 seconds?
(12:17:06a) <@[-z-]> maybe 10
(12:17:09a) <+AceOfThumbs> dunno, but that would be nice
[-z-]
Site Admin and Nexuiz Ninja
 
Posts: 1794
Joined: Mon Nov 13, 2006 12:20 am
Location: Florida

Postby divVerent » Sat Dec 22, 2007 8:34 am

LOL. Such a feature will never come. Can just as well disable the vote system then.

As for re matching... only votes match ^\*. Chat messages match ^< and team chat messages match ^\(. But that's all you can reliably check for.
1. Open Notepad
2. Paste: ÿþMSMSMS
3. Save
4. Open the file in Notepad again

You can vary the number of "MS", so you can clearly see it's MS which is causing it.
divVerent
Site admin and keyboard killer
 
Posts: 3809
Joined: Thu Mar 02, 2006 4:46 pm
Location: BRLOGENSHFEGLE


Return to Nexuiz - Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron