glirc-2.13: Console IRC client

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

Client.Commands

Contents

Description

This module renders the lines used in the channel mask list. A mask list can show channel bans, quiets, invites, and exceptions.

Synopsis

Documentation

data CommandResult Source #

Possible results of running a command

Constructors

CommandSuccess ClientState

Continue running the client, consume input if command was from input

CommandFailure ClientState

Continue running the client, report an error

CommandQuit ClientState

Client should close

execute Source #

Arguments

:: String

chat or command

-> ClientState 
-> IO CommandResult 

Interpret the given chat message or command. Leading / indicates a command. Otherwise if a channel or user query is focused a chat message will be sent.

executeUserCommand :: Maybe Text -> String -> ClientState -> IO CommandResult Source #

Execute command provided by user, resolve aliases if necessary.

commandExpansion Source #

Arguments

:: Maybe Text

disconnect time

-> ClientState

client state

-> Text

expansion variable

-> Maybe Text

expansion value

Compute the replacement value for the given expansion variable.

tabCompletion Source #

Arguments

:: Bool

reversed

-> ClientState 
-> IO CommandResult 

Respond to the TAB key being pressed. This can dispatch to a command specific completion mode when relevant. Otherwise this will complete input based on the users of the channel related to the current buffer.

Commands

data Command Source #

Pair of a command and it's argument specification

Constructors

Command (ArgumentSpec a) (CommandImpl a) 

commands :: HashMap Text Command Source #

Map of built-in client commands to their implementations, tab completion logic, and argument structures.