irc-core: An IRC client library and text client

[ library, network ] [ Propose Tags ]

This package provides an IRC connection library as well as a console-based IRC client that uses the library.

Library module breakdown

  • Irc.Cmd - Functions for generating IRC protocol message for client-to-server

  • Irc.Core - Functions for parsing low-level IRC messages into mid-level IRC messages

  • Irc.Core.Prisms - Prisms for all of the mid-level IRC message constructors

  • Irc.Format - Functions for parsing and rendering low-level IRC protocol messages

  • Irc.Message - High-level IRC event messages for client interpretation

  • Irc.Model - Functions for interpreting mid-level IRC messages to generate high-level event messages and to maintain a consistent view of the connection

  • Irc.RateLimit - Functions to assist with rate-limiting outgoing client messages

  • Irc.Time - Internal compatibility module for time-1.4 and time-1.5 interop

Library module breakdown

  • Main - Main client module

  • ClientState - Types and operations representing the full state of the client

  • CommandArgs - Types and functions for interpreting the initial client configuration

  • CommandParser - Types and functions for parsing and pretty printing IRC commands

  • Connection - Types and functions for establishing a plain and TLS connections

  • CtcpHandler - Event handler for CTCP messages

  • EditBox - Types and functions for managing the input box along the bottom of the client

  • HaskelHighlighter - Haskell syntax highlighting support

  • ImageUtils - Functions to support the various view construction

  • Moderation - Implementation of various IRC channel moderation automation

  • ServerSettings - Types for defining connection parameters for an IRC server

  • Views.BanList - Functions to generate the ban list view

  • Views.Channel - Functions to generate message list views

  • Views.ChannelInfo - Functions to generate metadata views for channels

See the associated README file for help using the client.


[Skip to Readme]

Flags

Automatic Flags
NameDescriptionDefault
time15Enabled

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 1.0, 1.1, 1.1.0.1, 1.1.1, 1.1.1.1, 1.1.2, 1.1.3, 1.1.4, 1.1.5, 2.0.0.0, 2.1.0.0, 2.1.1.0, 2.1.1.1, 2.2.0.0, 2.2.0.1, 2.2.1, 2.3.0, 2.4.0, 2.5.0, 2.6.0, 2.7.0, 2.7.1, 2.7.2, 2.8, 2.9, 2.10, 2.11, 2.12
Change log CHANGELOG.md
Dependencies array (>=0.5 && <0.6), attoparsec (>=0.12.1.2 && <0.14), base (>=4.7.0.2 && <4.10), base64-bytestring (>=1.0.0.1 && <1.1), bytestring (>=0.10.4.0 && <0.11), config-value (>=0.4 && <0.5), connection (>=0.2.4 && <0.3), containers (>=0.5 && <0.6), data-default-class (>=0.0.1 && <0.2), deepseq (>=1.3.0.2 && <1.5), directory (>=1.2.1.0 && <1.3), filepath (>=1.3.0.2 && <1.5), free (>=4.11 && <4.13), haskell-lexer (>=1.0 && <1.1), irc-core, lens (>=4.7 && <4.15), network (>=2.6.0.2 && <2.7), old-locale (>=1.0.0.6 && <1.1), regex-tdfa (>=1.2 && <1.3), split (>=0.2.2 && <0.3), stm (>=2.4.4 && <2.5), text (>=1.2.0.4 && <1.3), time (>=1.4.2 && <1.7), tls (>=1.2.16 && <1.4), transformers (>=0.2 && <0.6), vty (>=5.2.7 && <5.6), x509 (>=1.5.0.1 && <1.7), x509-store (>=1.5.0 && <1.7), x509-system (>=1.5.0 && <1.7), x509-validation (>=1.5.1 && <1.7) [details]
License BSD-3-Clause
Copyright 2015 Eric Mertens
Author Eric Mertens
Maintainer Eric Mertens <emertens@gmail.com>
Category Network
Home page https://github.com/glguy/irc-core
Bug tracker https://github.com/glguy/irc-core/issues
Source repo head: git clone git://github.com/glguy/irc-core.git
Uploaded by EricMertens at 2016-06-14T21:34:17Z
Distributions Arch:2.11, Debian:2.8
Reverse Dependencies 2 direct, 0 indirect [details]
Executables glirc
Downloads 17977 total (91 in the last 30 days)
Rating 2.0 (votes: 1) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2016-06-14 [all 1 reports]

Readme for irc-core-1.1.5

[back to package description]

My IRC client

Build Status

Library

This package is split into a generic IRC modeling library and a VTY-base text client using that library.

Client Features

  • 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)
  • Nick tab completion
  • SASL authentication
  • New message notification
  • Customizable mention filter (looks for your nick plus extra search terms)
  • View ban, quiet, invex, and exception lists
  • Support for rendering/inputing colors and formatting
  • Haskell source code highlighting (/hs)
  • Write your modifications in Haskell!
  • Chanserv automation (automatically requests op from chanserv for privileged commands), automatically deop after 5 minutes of not performing privileged commands.
  • Command syntax highlighting with hints.
  • Each user's nick is assigned a consistent color, when a user's nick is rendered in a chat message it uses that same color.
  • Support for /STATUSMSG/ messages
  • Togglable support for merged view of all joined channels (F5).
  • Run commands upon connection

TLS

I've added TLS support. You can enable it with the -t flag. Note that Freenode (and other networks) will allow you to authenticate to NickServ via a client certificate. This is configurable via --tls-client-cert.

I use the x509-store for decoding certificates and private key files. This library seems to support PEM formatted files and does not seem to support encrypted private key files. If the key and certificate are both contained in the certificate file the private key command line argument is unnecessary.

Identifying with CERTFP

Startup

glirc <options> SERVER
  -c FILENAME  --config=FILENAME       Configuration file path (default ~/.glirc/config)
  -p PORT      --port=PORT             IRC Server Port
  -n NICK      --nick=NICK             Nickname
  -u USER      --user=USER             Username
  -r REAL      --real=REAL             Real Name
               --sasl-user=USER        SASL username
  -d FILE      --debug=FILE            Debug log filename
  -i USERINFO  --userinfo=USERINFO     CTCP USERINFO Response
  -t           --tls                   Enable TLS
               --tls-client-cert=PATH  Path to PEM encoded client certificate
               --tls-client-key=PATH   Path to PEM encoded client key
               --tls-insecure          Disable server certificate verification
  -h           --help                  Show help

Environment variables
IRCPASSWORD=<your irc password>
SASLPASSWORD=<your sasl 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.

Learn more about this file format at config-value

-- Optional file to dump raw server messages
debug-file: "debug.txt"

-- Defaults used when not specified on command line
defaults:
  port:            6667
  nick:            "yournick"
  username:        "yourusername"
  realname:        "Your real name"
  password:        "IRC server password"
  sasl-username:   "sasl_username"
  sasl-password:   "sasl_password"
  userinfo:        "user info string"
  tls:             yes -- or: no
  tls-client-cert: "/path/to/cert.pem"
  tls-client-key:  "/path/to/cert.key"

-- Override the defaults when connecting to specific servers
servers:
  * hostname:      "chat.freenode.net"
    sasl-username: "someuser"
    sasl-password: "somepass"
    socks-host:    "socks5.example.com"
    socks-port:    8080 -- defaults to 1080

  * hostname:      "example.com"
    port:          7000
    connect-cmds:
      * "JOIN #favoritechannel,#otherchannel"
      * "PRIVMSG mybot another command"

    -- Specify additional certificates beyond the system CAs
    server-certificates:
      * "/path/to/extra/certificate.pem"

Commands

  • /exit - Exit!

  • /akb <nick> <message> - Auto-kickban: Request ops from chanserv if needed, ban by accountname if known, hostname otherwise, kick with message

  • /bans - Show known bans for current channel. Note: Request bans list with /quote mode <channel> +b

  • /channel <channel> - switch to a user message window

  • /channelinfo - Show information for the current channel

  • /ctcp <command> <params> - Send CTCP command to current window

  • /clear - Clear all messages for the current channel

  • /help <topic> - Request help from the server

  • /hs <haskell source code> - Send syntax highlighted source code as a message to the current channel

  • /ignore <nick> - Toggle ignoring a user by nickname.

  • /join <channel> - join a new channel (optional key argument)

  • /kick <nick> <msg> - Kick a user from the current channel

  • /masks <mode> - Show the bans (b), quiets (q), invex (I), or ban exemptions (e) for a channel. The list must be requested as above.

  • /me <message> - send an action to the current channel

  • /mode <mode> <arguments> - Set modes on the current channel

  • /msg <nick> <message> - send a private message

  • /nick <nick> - Change your nickname

  • /notice <nick> <message> - send a notice message

  • /op <nicks> - Op nicks in the channel, self when no nicks given

  • /deop <nicks> - Deop nicks in the channel, self when no nicks given

  • /voice <nicks> - Voice nicks in the channel, self when no nicks given

  • /devoice <nicks> - Devoice nicks in the channel, self when no nicks given

  • /part <message> - part the current channel with the given message

  • /query <nick> - switch to a user message window

  • /quote <raw client command> - send a client command verbatim

  • /remove <nick> <msg> - Force a user to part from the current channel

  • /server - switch to the server message window

  • /topic <topic> - Change the topic for the current channel

  • /umode <mode> - Set modes on yourself

  • /window <number> - Jump to a window by index

  • /whois <nick> - Query the server for information about a user

  • /whowas <nick> - Query the server for information about a user who recently disconnected.

  • /stats <letter> - Request server stat information, try /help stats on Freenode first.

  • /admin - Request some basic admin contact information

  • /away <message> - Toggle current away status

  • /time - Request server time

  • /oper - Enter your OPER credentials

  • /accept - Add user to the "accept list", try /help accept on Freenode

  • /unaccept - Remove a user from the "accept list"

  • /acceptlist - List users on accept lists

  • /knock - Request an /invite/ to a restricted channel

  • /invite <nick> - Invite the given user to the current channel

  • /reconnect - Reconnect to the current server

  • /ping - Send ping to upload current roundtrip time

  • /ping <msg> - Send manually specified ping message

Filters

  • /filter - Filter chat messages by space-delimited set of nicknames
  • /grep - Filter chat messages using a regular expression on the message

Keyboard Shortcuts

  • ESC quit
  • ^N next channel
  • ^P previous channel
  • M-# jump to window
  • M-A jump to activity
  • ^A beginning of line
  • ^E end of line
  • ^K delete to end
  • ^U delete to beginning
  • ^D delete at cursor
  • ^W delete word
  • ^Y paste from yank buffer
  • M-F forward word
  • M-B backward word
  • TAB nickname completion
  • F2 toggle detailed view
  • F3 toggle timestamps
  • F4 toggle compressed metadata
  • F5 toggle all channel view
  • Page Up scroll up
  • Page Down scroll down
  • ^B bold
  • ^C color
  • ^V reverse video
  • ^_ underline
  • ^] italic
  • ^O reset formatting