Copyright | (c) Dan Doel 2016 |
---|---|
License | ISC |
Maintainer | dan.doel@gmail.com |
Safe Haskell | None |
Language | Haskell2010 |
This module defines types for hooking into the operation of the client.
- data MessageResult
- = PassMessage
- | OmitMessage
- | RemapMessage IrcMsg
- data MessageHook = MessageHook {
- _messageHookName :: Text
- _messageHookStateful :: Bool
- _messageHookAction :: IrcMsg -> MessageResult
- messageHookName :: Lens' MessageHook Text
- messageHookStateful :: Lens' MessageHook Bool
- messageHookAction :: Lens' MessageHook (IrcMsg -> MessageResult)
- applyMessageHooks :: [MessageHook] -> IrcMsg -> Maybe IrcMsg
Documentation
- Message hook results
data MessageResult Source #
The possible results of a MessageHook
action. A hook can decline to
handle a message (PassMessage
), filter out a message (OmitMessage
),
or change a message into an arbitrary other message (RemapMessage
).
PassMessage | |
OmitMessage | |
RemapMessage IrcMsg |
- Message hooks
data MessageHook Source #
MessageHook | |
|
messageHookName :: Lens' MessageHook Text Source #
messageHookStateful :: Lens' MessageHook Bool Source #
messageHookAction :: Lens' MessageHook (IrcMsg -> MessageResult) Source #
applyMessageHooks :: [MessageHook] -> IrcMsg -> Maybe IrcMsg Source #