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.
Synopsis
- data MessageResult
- data MessageHook = MessageHook {}
- 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 | continue processing |
OmitMessage | stop processing and drop message |
RemapMessage IrcMsg | stop processing and return new message |
Instances
Semigroup MessageResult Source # | |
Defined in Client.Hook (<>) :: MessageResult -> MessageResult -> MessageResult # sconcat :: NonEmpty MessageResult -> MessageResult # stimes :: Integral b => b -> MessageResult -> MessageResult # | |
Monoid MessageResult Source # | |
Defined in Client.Hook mempty :: MessageResult # mappend :: MessageResult -> MessageResult -> MessageResult # mconcat :: [MessageResult] -> MessageResult # |
- Message hooks
data MessageHook Source #
MessageHook | |
|