McFilter adds basic filtering and callback registration for chat messages. The goal is to be simple, lightweight and self contained. Currently supports registering callbacks in response to chat events--does not support chat filter callbacks yet. They will be added shortly.
What follows is an example of a simple mod that responds to a whisper with a request for their current DKP.
Given that you have this function:
function MyMod.Whisper(dest, str)
SendChatMessage(str, "WHISPER", nil, dest)
-- Need real logic here, but whatevs.
Then, you'd add a filter function, which must be defined before you register the chat callback
function MyMod.OnPotentialRequest(msg, author, language)
if (msg:find("^![dD][kK][pP]") then
MyMod.Whisper(string.format("Your current DKP is %.2f", MyMod.GetCurrentDkp(author))