Feature Event message filtering

fredg1

Member
Preferences => Look & Feel => Chat Options
Only option is "Ignore event messages in KoLmafia chat", yes or no

I obviously don't want to check this box, since I want to be notified when I receive a message or an announcement is made, but there also is some event message that I DON'T want to see. Those are mostly the results of Top Menu Custom chat macros (things like casting Ode to booze or Cannelloni cocoon, or /goto a location not available in the "Link to Place" selection (I'm using "Icons" Style for the top menu)).

This is especially annoying since event messages appear in THREE locations: In the Event tab of chat; whenever you hit Main.php AND they are logged in the GCLI.

Is such a request feasible?
 

fronobulax

Developer
Staff member
This is especially annoying

A tip - there was a time when the quickest way to get ignored by the devs was to use the word "annoying" (or derivatives thereof) when discussing KoLmafia behavior. The general attitude was that if using a free program written and provided as a service to the community by volunteers is "annoying" then don't use it. Since this is the second time you have used the word recently, perhaps you might consider only using it when you want people to be mad at you?

Moving on, I think you are asking for some kind of filter - only report messages of specific types. It is certainly feasible but as I look at the code there is no obvious to me way of determining what "type" of event is generating the message. Event messages are generated and all pass through the same place where the display/don't display decision is made. So we either need a way to determine what type a message is, or implement some kind of check every place that generates a message.
 

fredg1

Member
Well, besides events like going in and out of away mode, pretty much all filter-requested (at least for me) event messages come from awesomemenu.php#, so while I'm guessing that other people sharing my wish to have this kind of filter (if any) also may want it for chat macros (which, after all, is what the "icons" top menu can act as a shortcut for), if there's a way to tell if they came from there, it would be a great place to start.


The OTHER thing I thought of while trying to sleep yesterday: the kind of message (I'll talk at the 2nd person from now on, to generalize) you'd want to ignore are the ones you know, the ones that appear repeatedly because you know they work, and you use them often (e.g. Casting Cannelloni Cocoon. or Loading "clan_raidlogs.php".).
Because of this, I guess that the best way to make this kind of filter could be not by filtering where they came from, but what exact text they contain (e.g. if(event message="Loading "clan_raidlogs.php"."){don't print} (obviously not real code)).

Thinking about this more thoroughly, maybe I should make this feature request at KoL-level instead of mafia? Making it so that when building the chat macros themselves, there is a function to make a command "silent"? (which you would only put once you troubleshot the macro and know it works as intended)
 
Last edited:

fronobulax

Developer
Staff member
OK. It turns out that all the messages are already in an Event object, but I didn't find an obvious origin filter. Sender maybe? As someone who avoids chat I'm not sure the benefits of filtering exceed to effort of adding a "type" field and then setting it. It might be feasible to suppress all chat macro messages but I'm not sure and definitely not certain that is more useful than the current situation.
 
Top