Copyright | (c) Eric Mertens 2018 |
---|---|
License | ISC |
Maintainer | emertens@gmail.com |
Safe Haskell | None |
Language | Haskell2010 |
This module implements the interaction between the client and its extensions. This includes aspects of the extension system that depend on the current client state.
Synopsis
- clientChatExtension :: Text -> Text -> Text -> ClientState -> IO (ClientState, Bool)
- clientCommandExtension :: Text -> Text -> ClientState -> IO (Maybe ClientState)
- clientStartExtensions :: ClientState -> IO ClientState
- clientNotifyExtensions :: Text -> RawIrcMsg -> ClientState -> IO (ClientState, Bool)
- clientStopExtensions :: ClientState -> IO ClientState
- clientExtTimer :: Int -> ClientState -> IO ClientState
Documentation
:: Text | network |
-> Text | target |
-> Text | message |
-> ClientState | client state, allow message |
-> IO (ClientState, Bool) |
Dispatch chat messages through extensions before sending to server.
clientCommandExtension Source #
:: Text | extension name |
-> Text | command |
-> ClientState | client state |
-> IO (Maybe ClientState) | new client state on success |
Dispatch /extension
command to correct extension. Returns
Nothing
when no matching extension is available.
clientStartExtensions Source #
:: ClientState | client state |
-> IO ClientState | client state with new extensions |
Start extensions after ensuring existing ones are stopped
clientNotifyExtensions Source #
:: Text | network |
-> RawIrcMsg | incoming message |
-> ClientState | client state |
-> IO (ClientState, Bool) | drop message when false |
Dispatch incoming IRC message through extensions
:: ClientState | client state |
-> IO ClientState | client state with extensions unloaded |
Unload all active extensions.
:: Int | extension ID |
-> ClientState | client state |
-> IO ClientState |
Run the next available timer event on a particular extension.