It'd be nice to be able to determine if Bot has already handled a message, so as to not have multiple modules fire at the same time. My own personal impetus for this would be to handle any message that couldn't be handled by some other module.

Comments

Itafroma’s picture

To flesh out this idea some more:

I'm thinking it'd be good to have an admin toggle: "Handle messages only once." and an accompanying list box that would determine the handling priority, so as to guide Bot on how to handle conflicts. If the toggle is on, Bot handles messages according to the priority, otherwise, it responds to messages every way it knows how.

I think a big obstacle to implementing this besides being able to turn it off/ignore it as Morbus had mentioned is that it's easy to simply "leave out" the required line of the code to make this useful. If a module never triggers the flag when it handles a message, no other module would know that the message was handled. I'm not sure how to get around that.

morbus iff’s picture

Status: Active » Closed (works as designed)

I've thought about this numerous times over the years and still have yet to figure out how to handle it nicely. The need hasn't really arisen internally (though there is some ooky bot_factoid/bot_tell backscratching) so, though I can see a use case for your need ("respond to something that hasn't previously responded to"), I'm going to close the ticket with a "no friggin' clue".