DukeLupus / dlFilter

dlFilter is a text filtering script for mIRC. It is created with both chat and file sharing channels in mind. dlFilter removes ads, requests, annoying KeepTrack, mp3 play & away messages and much more. Also, dlFilter can send notices from fileservers to separate window and group @find results, allowing them to be easily viewed.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add custom filters per channel

ask2018 opened this issue · comments

Hi, it's possible to add Custom filter specific per channel? I mean for example I have #channelA where I have stringA filtered, then I have #channelB where I have stringB filtered, but stringA is not filtered here.

It is not possible in the current version.

To add it to a future version we will need to find a syntax for including the channel as part of the filtering string in order to avoid excessively complex UI. How about...

  1. If the string is in a channel message type; and
  2. The first blank delimited token starts with a "#" and ends with a ":"
  3. There is further text for filtering

Then the message will only be filtered in that channel?

Whilst thinking about this, do we want to add similar functionality for Private messages where the delimited token starts with "@" and ends with ":"?

I need this only for channels, but maybe it may be useful also for private messages for somebody else.
Dunno if that's somehow possible, but it would be cool something similar Adblock is using for the filters, where its first website specified and then the filtered string. So here it could be something like #channelname|filteredstring and applied only to the channel specified there. But any other way to make this work is ok for me.

Cannot do that - we need backward compatibility.

The format would need to be:
a. A change which allows existing custom filters to continue working on all channels; and
b. Something that is easy for the user to construct themselves.

I suspect this might be something very few users will ever need. If it is simple to implement and easy to configure/understand then sure, but otherwise this might be a bit too "feature creep" imho.

Sophist-UK:
Backward compatibility could be easily done by auto prefixing current list with something like #allchannels| in the background and special check box to enable this new feature. So for users who don't need this feature nothing will change and their custom lists will work as before.
And I think the channel prefix is very easy to do and understand for the users.

SanderSade:
Why do you think for very few users? I think lot of irc users are on channels where are some info posted by bots and need to filter it somehow. And various channels, various things you need to filter.

I guess we could use #something| as easily as #something: . Should be easy to implement.

ask2018: there is a good chance that if something needs to be filtered on one channel, the same info either needs to be filtered on other added channels, or those filters will not interfere with the messages on the other channels

SanderSade:
I think that's because your are thinking about the filter just like about some simple spam/advert filter and yes in such case it may be partially true. Partially because anyone who wants to force you to disable the filter can just mark useful information with some common spam word like "advert" for example and if you cannot create custom filters per channel, then you need to disable the filter for whole channel. This is quite common on websites, where sometimes useful parts have classes names like "ads" to force users disable ad blockers.
But I'm thinking about the filter more like about information sorting filter. That means I can have for example 2 channels where are posted some info with "github" url inside. But for one channel I want to keep them and filter other stuff there and for the other one I dont want to keep the github url lines, because they are not useful for me in any way.
In my opinion this makes it much more poweful and with much wider usage with potential larger user base. Basically it's similar like many users using adblockers on websites - not just to filter ads, but also to filter non useful parts of web for them, to make it cleaner and faster to read and more productive. And that's impossible without custom filters per each website. And I see it similar here with irc channels.

It is a bit more complicated - because you would need to also optionally limit it by network.

So you would have to allow custom channel filters to be prefixed by network#channel (where either network or channel is optional) and custom private filters to be prefixed by network@nick where either network or nick is optional.

You might even want to negate either the network or channel or nick i.e. filter unless it is on that network or channel or from that user.

To be certain that existing filters will work as-is you would need to display the network + channel/userid separately and hold them in separate mIRC variables from the filter text.

However I now think that this is doable when I have the time.

That would be awesome. If you will need some testing then, let me know.