-
Notifications
You must be signed in to change notification settings - Fork 2
MessageFilter
Jonathan Starnes edited this page Sep 17, 2013
·
1 revision
A message filter is used to filter messages from the producer to NBot and from a message handler to the client. It has the ability to stop the message from sending as well as changing the message.
public interface IMessageFilter
{
bool FilterMessage(Message message); // <-- Filters the message from the producer
bool FilterMessage(ref string message); // <-- Filters the message to the client
}
This concept is used to create the Handle Bars plugin which will replace a named key ({{Key}}) with a value with that key from the brain. There is also a version that will do regular expression filtering and replacement.