glirc-2.20.2: Console IRC client

Copyright(c) Dan Doel, 2016
LicenseISC
Maintainerdan.doel@gmail.com
Safe HaskellNone
LanguageHaskell2010

Client.Hook

Description

This module defines types for hooking into the operation of the client.

Synopsis

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).

  • Message hooks

data MessageHook Source #

Constructors

MessageHook 

Fields

applyMessageHooks :: [MessageHook] -> IrcMsg -> Maybe IrcMsg Source #

Apply the given message hooks to an IrcMsg. The hooks are tried in order until one handles the message. A Nothing result means the message was filtered out by a hook. A Just result contains the actual IrcMsg to be processed.