glirc-2.31: Console IRC client

Copyright(c) Eric Mertens 2018
LicenseISC
Maintaineremertens@gmail.com
Safe HaskellNone
LanguageHaskell2010

Client.State.Extensions

Description

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

Documentation

clientChatExtension Source #

Arguments

:: 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 #

Arguments

:: 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 #

Arguments

:: ClientState

client state

-> IO ClientState

client state with new extensions

Start extensions after ensuring existing ones are stopped

clientNotifyExtensions Source #

Arguments

:: Text

network

-> RawIrcMsg

incoming message

-> ClientState

client state

-> IO (ClientState, Bool)

drop message when false

Dispatch incoming IRC message through extensions

clientStopExtensions Source #

Arguments

:: ClientState

client state

-> IO ClientState

client state with extensions unloaded

Unload all active extensions.

clientExtTimer Source #

Arguments

:: Int

extension ID

-> ClientState

client state

-> IO ClientState 

Run the next available timer event on a particular extension.