From 8dc9d73f0ee351ef3a2a6fd85f6ffc6ce6963dab Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Mon, 20 Jan 2014 13:35:42 +0100 Subject: [PATCH] Document inFilter and outFilter. --- develop/events.rst | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/develop/events.rst b/develop/events.rst index fc1eef8..7517d35 100644 --- a/develop/events.rst +++ b/develop/events.rst @@ -23,6 +23,19 @@ and a :ref:`IrcMsg object `. To get a list of all possible messages, check IRC RFCs. +Filters +======= + +The ``inFilter`` and ``outFilter`` methods allow you to “intercept” +messages between the bot and the network and to alter them. + +``inFilter`` gets messages just after they are parsed from network; +and its return value is fed to the bot. +``outFilter`` does the opposite: it get any message the bot is about +the send, and returns a message (which may be the same) that will +be sent instead. + + .. _commands_handling: Commands handling