• Stars
    star
    157
  • Rank 238,399 (Top 5 %)
  • Language
    Haskell
  • License
    ISC License
  • Created almost 10 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Haskell IRC library and console client - Join us on libera.chat #glirc

GLIRC - Advanced Console IRC Client

  • glirc Hackage Build Status
  • irc-core Hackage
  • hookup Hackage

Wiki Documentation

Building

glirc uses recent versions of packages, make sure you package databases are up-to-date:

$ cabal update

To install the latest version from Hackage using cabal-install:

$ cabal install glirc

Building with cabal-install from source checkout

$ cabal install --dep
$ cabal build

Client Features

  • All views and transformation are dynamic and don't change the underlying model.
  • Subsequent joins and parts fold into one line and do not scroll chat messages off the screen
  • Ignore support that folds ignored messages into the joins and parts. Toggle it off to see previously hidden messages
  • Detailed view to see all the messages in a channel in full detail with hostmask and timestamp (F2)
  • Context sensitive tab completion
  • Searchable ban, quiet, invex, and exception view separate from chat messages
  • Searchable user list, detailed view shows full hostmasks
  • WYSIWYG mIRC formatting input
  • Multi-line editing
  • Dynamic, in-place message searching
  • Chanserv integration
  • Nicknames in chat messages are colored to match messages from that nickname
  • Support for /STATUSMSG/ messages (messages only voice or op users can see)
  • Run commands upon connection
  • Command macros
  • CERTFP and SASL authentication
  • Split-screen view
  • Configurable color palette

Startup

glirc [FLAGS] INITIAL_NETWORKS...
  -c PATH  --config=PATH  Configuration file path
  -!       --noconnect    Disable autoconnecting
  -h       --help         Show help
  -v       --version      Show version

Environment variables

USER=<default nickname and username>
IRCPASSWORD=<your irc password>

Configuration file

A configuration file can currently be used to provide some default values instead of using command line arguments. If any value is missing the default will be used.

The default configuration file path is ~/.config/glirc/config

Relative paths are relative to the home directory.

Learn more about this file format at config-value

-- vim: filetype=config-value
-- Grab the Vim syntax highlighting file from the config-value package

-- Learn more about these settings with `glirc --config-format`

-- Defaults used when not specified on command line
defaults:
  nick:            "yournick"
  username:        "yourusername"
  realname:        "Your real name"
  password:        "IRC server password"
  tls:             yes -- or: no, or: starttls
                       -- enabling tls automatically uses port 6697
  tls-verify:      yes -- or: no

-- Override the defaults when connecting to specific servers
servers:
  * name: "libera"
    hostname:      "irc.libera.chat"
    sasl:
      username: "someuser"
      password: "somepass"
    socks-host:    "socks5.example.com"
    socks-port:    8080 -- defaults to 1080
    log-dir:       "/home/myuser/ircLogs"

  * name: "example"
    hostname:      "example.com"
    port:          7000 -- override the default port
    connect-cmds:
      * "join #favoritechannel,#otherchannel"
      * "msg mybot another command"

    -- Specify additional certificates beyond the system CAs
    -- relative to home directory
    tls-server-cert: "extra/certificate.pem"

macros:
  * name: "wipe"
    commands:
      * "clear"
      * "znc *status clearbuffer $channel"

  * name: "mysplits"
    commands:
      * "splits fn:#haskell fn:#haskell-offtopic"

  -- Example use of macro in combination with an extension
  * name: "extra"
    commands:
      * "extension Lua some-parameter $network $channel"

extra-highlights: ["glirc", "lens"]

nick-padding:
   side: left -- try right if you don't like left padding
   width: 13

url-opener: "open" -- This works on macOS, "xdg-open" for most Linuxes

key-bindings:
  * bind: "C-M-b"
    command: "masks b"

palette:
  line-marker: yellow
  time:
    fg: [10,10,10] -- RGB values for color for timestamps
    bg: blue
  nick-colors:
    [ cyan, magenta, green, yellow, blue
    , bright-cyan, bright-magenta, bright-green, bright-blue
    , 218,  88,  89, 124, 160, 205, 212, 224 -- reds
    ,  94, 130, 166, 172, 208, 214, 216, 180 -- oranges
    ,  58, 226, 229, 184, 187, 100, 142, 220 -- yellows
    ,  22,  34,  40,  82,  70,  64,  48,  85 -- greens
    ,  25,  27,  33,  39,  51,  80,  81,  75 -- blues
    ,  69,  61,  56,  54, 129,  93,  99, 147 -- purples
    ]

Configuration sections:

setting type description
defaults server These settings are used for all connections
servers list of servers These settings are used to override defaults when the hostname matches
palette palette Client color overrides
window-names text Names of windows (typically overridden on non QWERTY layouts)
nick-padding nonnegative integer Nicks are padded until they have the specified length
indent-wrapped-lines nonnegative integer How far to indent lines when they are wrapped
extra-highlights list of text Extra words/nicks to highlight
extensions list of text Filenames of extension to load
url-opener text Command to execute with URL parameter for /url e.g. xdg-open on most Linuxes or open on macOS
ignores list of text Initial list of nicknames to ignore
activity-bar yes or no Initial setting for visibility of activity bar (default no)
bell-on-mention yes or no Sound terminal bell on transition from not mentioned to mentioned (default no)
macros list of macros User-configurable client commands

Server Settings

setting type description
name text name of server entry, defaults to hostname
hostname text hostname used to connect and to specify the server
port number port number, defaults to 6667 without TLS and 6697 with TLS
nick text or list of text nicknames to try in order
username text server username
realname text real name / GECOS
password text server password
sasl sasl-settings SASL authentication settings
tls yes/no/starttls use TLS to connect
tls-verify yes/no enable/ disable TLS certificate checks
tls-client-cert text path to TLS client certificate
tls-client-key text path to TLS client key
tls-server-cert text CA certificate to use when validating certificates
tls-ciphers text OpenSSL cipher suite description string
connect-cmds list of text client commands to send upon connection
socks-host text hostname of SOCKS proxy to connect through
socks-port number port number of SOCKS proxy to connect through
chanserv-channels list of text list of channels with chanserv op permission
flood-penalty number cost in seconds per message
flood-threshold number threshold in seconds for burst
message-hooks list of text names of hooks to enable
reconnect-attempts int number of reconnections to attempt on error
autoconnect yes or no automatically connect at client startup
nick-completion default or slack set this to slack to use @ sigils when completing nicks

SASL Settings

By default SASL will use PLAIN mode, but you can specify one of: plain, external, or ecdsa-nist256p-challenge.

setting type description
mechanism optional mechanism SASL mechanism (defaults to PLAIN)
username text SASL username (PLAIN and ECDSA-NIST256P-CHALLENGE mode)
password text SASL password (PLAIN mode)
private-key text Path to ECDSA private key file (ECDSA-NIST256P-CHALLENGE mode)
authzid text Authorization identity (very rarely needed)

Palette

entry type description
nick-colors list of attr Use for nick highlights
self attr our own nickname(s) outside of mentions
self-highlight attr our own nickname(s) in mentions
time attr timestamp on messages
meta attr metadata (joins/parts/etc.)
sigil attr sigils (+@)
label attr information labels
latency attr latency time
error attr error messages
textbox attr textbox edges (^$)
window-name attr current window name
activity attr activity notification
mention attr mention notification
command attr recognized command
command-prefix attr prefix of known command
command-ready attr recognized command with arguments filled
command-placeholder attr command argument placeholder
window-divider attr the dividing line between split windows
line-marker attr the dividing line for new messages

Text Attributes

Text attributes can be specified either as a single foreground color or section of attributes.

  • <number> - Maps to a terminal color
  • <name> - Direct selection of standard 16 terminal colors
  • [red-number, blue-number, green-number] - List of 3 numbers in range 0-255 map to an approximation of the RGB color.

Attributes

  • fg - foreground color
  • bg - background color
  • style - single style or list of styles

Styles

  • blink
  • bold
  • dim
  • standout
  • reverse-video
  • underline

Commands

Client commands

  • /help [command] - Show in-client help
  • /exit - Terminate the client
  • /quit - Gracefully terminate connection to the current server
  • /connect <name> - Connect to the given server
  • /disconnect - Forcefully terminate connection to the current server
  • /reconnect - Reconnect to the current server
  • /reload [path] - Load a new configuration file (optional path)
  • /palette - Show the client palette
  • /digraphs - Show the table of digraphs
  • /mentions - Show all the highlighted lines across all windows
  • /extension <extension name> <params...> - Send the given params to the named extension
  • /exec [-n network] [-c channel] <command> <arguments...> - Execute a command, If no network or channel are provided send output to client window, if network and channel are provided send output as messages, if network is provided send output as raw IRC messages.
  • /url [n] - Execute url-opener on the nth URL in the current window (defaults to first)

View toggles

  • /toggle-detail - toggle full detail view of messages
  • /toggle-activity-bar - toggle channel names in activity bar
  • /toggle-metadata - toggle visibility of channel metadata
  • /toggle-layout - toggle split-screen layout between 1 and 2 column view

Connection commands

  • /nick <nick> - Change nickname
  • /away <message> - Set away status

Window management

  • /windows [filter] - List all open windows (filters: networks, channels, users)
  • /focus <server> - Change focus to server window
  • /focus <server> <channel> - Change focus to channel window
  • /clear [network] [channel] - Clear contents of current or specified window
  • /ignore - Show all ignore masks
  • /ignore <mask>... - Toggle ignore status on a list of masks
  • /channel <channel> - Change focus to channel on current network (alias: /c)
  • /splits [focuses...] - Enable split-screen view. Focuses should be space delimited list of NETWORK:CHANNEL
  • /splits+ [focuses...] - Incremental addition to splits
  • /splits- [focuses...] - Incremental removal from splits

Channel membership

  • /join <channel> - Join a channel (alias: /j)
  • /part - Part from current channel

Chat commands

  • /query <target> [<msg>] - Switch focus to target window on current server, optionally send message
  • /msg <target> <msg> - Send a message on the current server to target
  • /notice <target> <msg> - Send a notice message on the current server to target
  • /ctcp <target> <command> <args> - Send a ctcp command on the current server to target
  • /me <msg> - Send action message to channel
  • /say <msg> - Send normal message to channel

Channel management

  • /mode <mode> <params> - Change modes on the current channel (advanced tab completion)
  • /kick <nick> - Kick a user
  • /kickban <nick> - Kick and ban a user
  • /remove - Gracefully kick a user
  • /topic <topic> - Change the topic (tab completion for topic)
  • /invite <nick> - Invite a user to the current channel

Queries

  • /who <query> - Perform WHO query (use detailed view to see output)
  • /whois <nick> - Perform WHOIS query
  • /whowas <nick> - Perform WHOWAS query
  • /ison <nick> - Perform ISON query
  • /userhost <nick> - Perform USERHOST query
  • /links <server> - Perform LINKS query
  • /time - Perform TIME query
  • /stats <query> - Perform STATS query

Channel information

  • /users - Show channel user list
  • /masks <mode> - Show channel bans(b), quiets(q), exempts(e), or invex(I)
  • /channelinfo - Show channel topic, creation, url

Window filters

  • /grep - Filter chat messages using a regular expression
  • /grepi - Filter chat messages using a case-insensitive regular expression on the message

ZNC-specific

  • /znc <module> <parameters> - send command to ZNC module without echoing to all clients
  • /znc-playback - ZNC playback module - play everything
  • /znc-playback <time> - ZNC playback module - play everything start at the given time today
  • /znc-playback <date> <time> - ZNC playback module - play everything start at the given time

Low-level

  • /quote <raw command> - Send a raw IRC command to the server

Keyboard Shortcuts

Note that these keybindings are using Emacs syntax. C-a means "hold control and press A". M-a means "hold meta key and press A". On most modern keyboards the Meta key is labeled Alt or Option.

Window navigation

  • C-n next window
  • C-p previous window
  • C-x next network
  • M-# jump to window - 1234567890qwertyuiop!@#$%^&*()QWERTYUIOP
  • M-a jump to activity
  • M-s jump to previous window
  • ESC return to messages view (from userlist, masklist, help, etc)

Editing

  • C-a beginning of line

  • C-e end of line

  • C-k delete to end

  • C-u delete to beginning

  • C-d delete at cursor

  • C-w delete word backwards

  • C-y paste from yank buffer

  • C-t swap characters at cursor

  • M-f forward word

  • M-b backward word

  • M-Right forward word

  • M-Left backward word

  • M-Backspace delete word backwards

  • M-d delete word forwards

  • M-Enter insert newline

  • M-k insert digraph (2-characters before cursor)

  • Tab nickname completion

Client settings

  • F2 toggle detailed view
  • F3 toggle detailed activity bar
  • F4 toggle metadata visibility

Scrolling

  • Page Up scroll up
  • Page Down scroll down

Formatting

  • C-b bold
  • C-c color
  • C-v reverse video
  • C-_ underline
  • C-] italic
  • C-o reset formatting

Macros

The macros configuration section allows you to define sequences of commands. These commands can contain expansions.

Configuration

  • name - text - name of macro
  • arguments - text - space separated list of argument names (suffix name with ? when optional)
  • commands - list of text - commands to send after expansion

Macro Expansions

Variable names and integer indexes can be used when defining commands. Variables are specified with a leading $. For disambiguation a variable name can be surrounded by {}. $channel and ${channel} are equivalent. Default values can be provided following a pipe: ${var|default}.

  • channel - current channel
  • network - current network name
  • nick - current nickname

The arguments to a command will be mapped to integer indexes.

  • 0 - first argument
  • 1 - second argument (etc.)

Hooks

buffextras

Enable this hook when using ZNC and the buffextra module in order to reinterpret this module's messages natively in the client.

More Repositories

1

utf8-string

Support for reading and writing UTF8 Strings in Haskell
Haskell
45
star
2

advent2019

Advent of Code 2019 solutions
Haskell
43
star
3

advent2018

Advent of Code 2018 Solutions
Haskell
37
star
4

advent

Advent of Code complete solution archive and common library
Haskell
35
star
5

advent2017

Advent of Code 2017 solutions
Haskell
27
star
6

toml-parser

Haskell parser and printer for the TOML 1.0.0 file format
Haskell
23
star
7

generic-traverse

Demonstration for how to build "traverse" using GHC.Generics efficiently
Haskell
22
star
8

TwosGame

Haskell
21
star
9

th-abstraction

Uniform interface to reified data type information via Template Haskell
Haskell
20
star
10

config-value

Simple, layout-based, unambiguous configuration language implemented in Haskell
Haskell
17
star
11

advent2020

Advent of Code 2020 Haskell Solutions
Haskell
16
star
12

Ninjas

Haskell game where multiple players attempt to blend in with computer controlled characters while being first to visit the key locations on the board.
Haskell
15
star
13

advent2021

Haskell solutions for https://adventofcode.com/2021/
Haskell
14
star
14

hpaste

A pastebin written in Haskell
Haskell
14
star
15

ssh-hans

Haskell
12
star
16

advent2016

Haskell
11
star
17

advent2015

Haskell
11
star
18

tries

Haskell
11
star
19

intcode

Intocode interpreter for Advent of Code 2019
Haskell
9
star
20

GhcPkgUtils

Utilities for keeping up to date with hackage
Haskell
9
star
21

minecraft-proxy

Minecraft protocol proxy
Haskell
9
star
22

5puzzle

Puzzle solutions by encoding to SAT with Ersatz
Haskell
7
star
23

config-schema

Self-documenting, combinator constructed configuration schemas
Haskell
7
star
24

operations

Exploration of an object encoding for Haskell
Haskell
6
star
25

breadth-first-parser-combinators

Haskell
6
star
26

prettyprinter-vty

Prettyprinter backend for VTY
Haskell
5
star
27

sat-for-games

SAT tutorial exercise code
Haskell
5
star
28

LensTalk

Introductory lens presentation
Haskell
5
star
29

TripleGame

Haskell
4
star
30

config-app

Interactive configuration in GHCJS
HTML
4
star
31

punionfind

Persistent Disjoint set operation supporting the union/find operations in Haskell
Haskell
4
star
32

ord

An exploration of a variant of ordinals in Agda
Agda
4
star
33

type-open-syntax-demo

Demonstration of building models of expression languages with highly-typed, open recursion patterns
Haskell
4
star
34

example-embedded-haskell

Haskell
3
star
35

hm

Implementation of Hindley-Milner type checking as an exercise in using the unification-fd package
Haskell
3
star
36

my-agda-lib

Agda
3
star
37

algorithmic-heights

Haskell
3
star
38

AddParens

Teaching tool for Haskell that adds parentheses and explicit layout to an expression
Haskell
3
star
39

kami-solver

Haskell
2
star
40

CookieCalculator

C
2
star
41

lift-nary-operator

Use GHC.Generics to lift operators to work pointwise over product types
Haskell
2
star
42

RefreshLog

Haskell
2
star
43

wordle

Haskell
2
star
44

s5s

SOCKS 5 proxy server
Haskell
2
star
45

PdxTrackRouter

Bukkit plugin to support automatic junctions based on player's destination preference
Java
2
star
46

how-to-call-c

Haskell
2
star
47

set-game

Haskell, vty-based clone of the popular card game
Haskell
2
star
48

tt-ratings

Implementation of David J. Marcus' "New table tennis rating system"
JavaScript
2
star
49

linux-capabilities

Haskell-binding to the linux capabilities (libcap) library
Haskell
1
star
50

synacor-vm

C
1
star
51

quarto

Console-based implementation of Quarto board game
Haskell
1
star
52

networked-game

Haskell
1
star
53

PdxExplorers

A bukkit plug-in which allows users to configure multi-waypoint routes, track completion, and issue rewards
Java
1
star
54

sysyb

Use GHC.Generics without using it!
Haskell
1
star
55

circular-slide-rule

Haskell
1
star
56

Bombs

Haskell
1
star
57

smartlua

Lua
1
star
58

irc0

Haskell
1
star
59

animated-dangerzone

Haskell
1
star
60

Yinsh

Clone of the Yinsh board game
Haskell
1
star
61

vty-hangman-helper

Console-based application to assist in solving Hanging With Friends puzzles
Haskell
1
star
62

newttrs

Implementation of the New Table Tennis Rating System
Haskell
1
star
63

sticks

Exploration solving a little wooden puzzle
Haskell
1
star
64

simple-spreadsheet-tools

Simple text-based spreadsheet tools
Haskell
1
star
65

vty-samegame

Console-based Haskell implementation of Same Game
Haskell
1
star
66

lens-th

Haskell
1
star
67

snowcone

IRCd server notice console
C++
1
star