glirc-2.24/0000755000000000000000000000000013163054641010732 5ustar0000000000000000glirc-2.24/ChangeLog.md0000644000000000000000000001721413163054641013110 0ustar0000000000000000# Revision history for glirc2 ## 2.24 * `/query` now takes a message parameter and tab-completes like `/msg`. ## 2.23 * CONFIGURATION FILE CHANGE: Relative paths are now resolved from the directory of the configuration file. The "~" alias for the home directory works for resolving paths relative to $HOME. Absolute paths are unmodified. * Support network:#channel in /query * Add an optional OTR extension. See the otr-extension/ directory and the wiki for more information. * Extended the C API with `glirc_inject_chat` and `chat_entrypoint` * Smarter WYSIWYG highlighting in text edit box. Nicknames are highlighted and `/mode` command parameters get correct placeholders. * Added more information to `/palette` * Added "human readable" labels to `/rtsstats` ## 2.22 * Added dynanic indentation of wrapped lines. Lines now wrap to where the message portion of the line started. This removes `indent-wrapped-lines` configuration setting * Added pervasive word-boundary oriented line wrapping (beyond what was previously restricted to chat messages) * Made nick prefix padding configurable to be on left or right. See `nick-padding` setting in `glirc2 --config-format`. In addition this setting is now reconfigurable at runtime via `/reload` * Added `/oper` command for network operator authentication. * Memory savings by packing message timestamp information, and using the "detailed" image for regular expression matching. * Added `/rtsstats` command for inspecting the GHC RTS statistics * Added many minor IRC query commands: admin, info, map, rules motd, version, lusers, kill, knock, list. ## 2.21.1 * Support for latest config-schema * Adapt extension API to help support stub Rust extension ## 2.21 * Make metadata toggle (F4) a window-level setting instead of client level * Add configuration option to hide metadata by default `hide-metadata` * Make keymap configurable under `key-bindings`, add `/keymap` command * Add transient error message view, press ESC to clear * Implement two-column split window mode: `/toggle-layout` and F5 * Implement word-boundary based line wrapping ## 2.20.6 * Switch to new `config-schema` package for configuration file loading. * Add `--config-format` flag to executable to show configuration file format. ## 2.20.5 * Add line indicating message since previous time window was focused. The palette for this is configurable as `line-marker` ## 2.20.4 * Add `/query` alias for `/channel` * Add `/names` alias for `/users` * Update to build on GHC 8.2.1-rc1 with Cabal-2.0.0.0 ## 2.20.3 * Nicer `/help` system, commands are grouped * Added `/splits+` and `/splits-` for incremental updates to splits * Jump-to-activity returns to original window after activity is visited * Extended activity view makes use of empty space above text input * Parse the timestamp and duration from `/whois` response ## 2.20.2.1 * Support `vty-5.15` ## 2.20.2 * Remove `memory` dependency * Add `indent-wrapped-lines` setting ## 2.20.1.1 * Remove macro dependency on happy and alex being installed for version information ## 2.20.1 * Support `vty-5.11.1` ## 2.20 * Move from `tls` to `HsOpenSSL` support via the new `hookup` package ## 2.19 * Smarter text box tracks "scroll" position independently from cursor * Added `--full-version` flag * Remove `regex-tdfa-text` dependency * Added `bell-on-mention` client setting * Added `ExportCApi` cabal flag to help with loading the client in GHCi ## 2.18 * Add digraph support under `M-k` and `/digraphs` * Add ECDSA-NIST256P-CHALLENGE support for Freenode via Tor * Load mask list on `/masks` * Add `C-x` to change to next network window * Allow `/clear NETWORK *` to clear all windows for the given network ## 2.17 * Add `reconnect-attempts` setting * Add peristence for `/grep` and `/grepi` * Add filter argument to `/windows` * Better tab completion for `/channel` and `/focus` * Isolate and number urls in view with `/url` * Map `M-Left` and `M-Right` to backward word and forward word ## 2.16 * Add `/splits` to show multiple chat windows simultaneously ## 2.15 * Add `/mentions` * Add macro argument declarations * Add indication when a command is still a prefix or not of a valid command * Support quoted strings arguments to /exec * Add F4 to toggle visibility of metadata lines * tls-insecure setting was incorrectly behaving like normal insecure * Add `C-t` to swap characters * Add `ESC` to return to messages window ## 2.14 * Add `/help` * Add `/palette` * Add F3 to toggle activity detail bar ## 2.13 * Add disconnect expansion, support expansions in connect-cmds * Add default expansion syntax `${var|default}` * Add support for multiple nicknames to try on connect * Add `ignores` section to configuration * Add `url-opener` section to configuration and `/url` command ## 2.12 * Remove `tls-insecure` configuration option in favor of `tls: yes-insecure` * Implement fancy command placeholder rendering and argument parsing * Improved reconnect logic * Improved connection error messages ## 2.11 * Add `M-S` to jump to previously focused window * Add `extra-highlights` section * Tab complete servernames in `/connect` * Add `/windows` command for listing active windows * Add `glirc_clear_window` C API procedure * Allow `process_message` callback to drop messages * Add optional network and channel arguments to `/clear` (intended to assist macros) * Automatically reconnect on ping timeout * Many commands will report message to client window on error ## 2.10 * Fixes for multiline editing * Multiple, sequential kills all fill the same yank buffer ## 2.9 * Dynamically loadable extensions * Implement Lua scripting extension * Enable support for batch messages * Grow metadata lines to the right ## 2.8 * Support `vty-5.8` * Implement inital support for macros * Support `znc.in/self-message` ## 2.7 * Switch to regex-tdfa (easier to install on macOS than text-icu) * Tab-complete starts with most recent nick * Add `/reload` * Add custom palette entry for self highlights * Add ability to set background colors and styles in palette ## 2.6 * connect-cmds now use actual client commands instead of raw IRC messages. For example `msg user my message` or `join #mychannel` * Multiple lines can be held in the textbox at once. Pasting mutiple lines insert those lines into the textbox rather than sending them immediately. * Added `M-d` and `M-Enter` key bindings * Added `name` field to server configuration * Extract irc-core library again * Configurable self color ## 2.5 * Add facilities for hooks that can alter the irc message stream. * Implement a hook that handles the znc buffextras plugin. * Implement configurable nick color highlight palette. * Resolve relative paths starting at the home directory. * Significantly configurable UI colors ## 2.4 * Support XDG configuration directory, e.g. `~/.config/glirc/config` * Add more window names. Shift selects second set of names. * Add `/channel` and `/say` * Improve `/focus` tab completion ## 2.3 * Add commands `/znc` * Add initial support for ZNC's playback module and `/znc-playback` command * Don't consider message seen when in masklist, userlist, or channelinfo windows * Add terminal bell on command error ## 2.2 * Add commands `/ison`, `/userhost`, `/away`, `/notice`, `/ctcp`, `/links`, `/time`, `/stats` * Added context-sensitive completion to `/mode` * Render CTCP messages * Memory performance improvements * Improved logic on nick changes * Support for fractional flood settings * Fixed VTY formatting bug * Add counts to the mask and user lists ## 2.1 * Add red highlighting for own nick * Synchronize reply codes with Freenode * Add textual interpretation of reply codes * Add SASL support * Add `/channelinfo` command ## 2.0 * First version of glirc rewrite glirc-2.24/glirc.cabal0000644000000000000000000001547313163054641013030 0ustar0000000000000000name: glirc version: 2.24 synopsis: Console IRC client description: Console IRC client . glirc is a console IRC client with an emphasis on providing dynamic views into the model of your IRC connections. . license: ISC license-file: LICENSE author: Eric Mertens maintainer: emertens@gmail.com copyright: 2016,2017 Eric Mertens category: Network build-type: Custom extra-source-files: ChangeLog.md README.md exec/linux_exported_symbols.txt exec/macos_exported_symbols.txt cabal-version: >=1.23 homepage: https://github.com/glguy/irc-core bug-reports: https://github.com/glguy/irc-core/issues tested-with: GHC==8.0.2 custom-setup setup-depends: base >=4.9 && <4.11, filepath >=1.4 && <1.5, Cabal >=1.24 && <2.1 source-repository head type: git location: git://github.com/glguy/irc-core.git branch: v2 executable glirc2 main-is: Main.hs other-modules: Exports ghc-options: -threaded -rtsopts hs-source-dirs: exec default-language: Haskell2010 -- Constraints can be found on the library itself build-depends: base, glirc, lens, text, vty if os(Linux) ld-options: -Wl,--dynamic-list=exec/linux_exported_symbols.txt if os(Darwin) ld-options: -Wl,-exported_symbols_list,exec/macos_exported_symbols.txt library ghc-options: -Wall -O2 hs-source-dirs: src include-dirs: include includes: include/glirc-api.h install-includes: glirc-api.h default-language: Haskell2010 build-tools: hsc2hs exposed-modules: Client.Authentication.Ecdsa Client.CApi Client.CApi.Exports Client.CApi.Types Client.Commands Client.Commands.Arguments.Spec Client.Commands.Arguments.Parser Client.Commands.Arguments.Renderer Client.Commands.Exec Client.Commands.Interpolation Client.Commands.Recognizer Client.Commands.WordCompletion Client.Configuration Client.Configuration.Colors Client.Configuration.Macros Client.Configuration.ServerSettings Client.EventLoop Client.EventLoop.Actions Client.EventLoop.Errors Client.Hook Client.Hook.Znc.Buffextras Client.Hooks Client.Image Client.Image.Layout Client.Image.LineWrap Client.Image.Message Client.Image.MircFormatting Client.Image.PackedImage Client.Image.Palette Client.Image.StatusLine Client.Image.Textbox Client.Log Client.Message Client.Network.Async Client.Network.Connect Client.Options Client.State Client.State.Channel Client.State.EditBox Client.State.EditBox.Content Client.State.Focus Client.State.Network Client.State.Window Client.View Client.View.ChannelInfo Client.View.Digraphs Client.View.Help Client.View.KeyMap Client.View.MaskList Client.View.Mentions Client.View.Messages Client.View.Palette Client.View.RtsStats Client.View.UrlSelection Client.View.UserList Client.View.Windows other-modules: LensUtils StrictUnit Digraphs DigraphQuote RtsStats Paths_glirc Build_glirc build-depends: base >=4.9 && <4.11, HsOpenSSL >=0.11 && <0.12, async >=2.1 && <2.2, attoparsec >=0.13 && <0.14, base64-bytestring >=1.0.0.1&& <1.1, bytestring >=0.10.8 && <0.11, config-schema >=0.4 && <0.6, config-value >=0.6 && <0.7, containers >=0.5.7 && <0.6, directory >=1.2.6 && <1.4, filepath >=1.4.1 && <1.5, free >=4.12 && <4.13, gitrev >=1.2 && <1.4, hashable >=1.2.4 && <1.3, hookup >=0.1 && <0.2, irc-core >=2.3 && <2.4, kan-extensions >=5.0 && <5.1, lens >=4.14 && <4.16, network >=2.6.2 && <2.7, process >=1.4.2 && <1.7, regex-tdfa >=1.2 && <1.3, semigroupoids >=5.1 && <5.3, socks >=0.5.5 && <0.6, split >=0.2 && <0.3, stm >=2.4 && <2.5, template-haskell >=2.11 && <2.13, text >=1.2.2 && <1.3, time >=1.6 && <1.9, transformers >=0.5.2 && <0.6, unix >=2.7 && <2.8, unordered-containers >=0.2.7 && <0.3, vector >=0.11 && <0.13, vty >=5.11.1 && <5.18 test-suite test type: exitcode-stdio-1.0 main-is: Main.hs hs-source-dirs: test build-depends: base, glirc, HUnit >=1.3 && <1.7 default-language: Haskell2010 glirc-2.24/LICENSE0000644000000000000000000000133213163054641011736 0ustar0000000000000000Copyright (c) 2016 Eric Mertens Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. glirc-2.24/README.md0000644000000000000000000004523513163054641012222 0ustar0000000000000000GLIRC - Advanced Console IRC Client ============= * **glirc** [![Hackage](https://img.shields.io/hackage/v/glirc.svg)](https://hackage.haskell.org/package/glirc) [![Build Status](https://secure.travis-ci.org/glguy/irc-core.svg)](http://travis-ci.org/glguy/irc-core) * **irc-core** [![Hackage](https://img.shields.io/hackage/v/irc-core.svg)](https://hackage.haskell.org/package/irc-core) * **hookup** [![Hackage](https://img.shields.io/hackage/v/hookup.svg)](https://hackage.haskell.org/package/hookup) [Wiki Documentation](https://github.com/glguy/irc-core/wiki) ![](https://raw.githubusercontent.com/wiki/glguy/irc-core/images/screenshot.png) Building ======== glirc uses recent versions of packages, make sure you package databases are up-to-date: ``` $ cabal update # if you're using cabal $ stack update # if you're using stack ``` 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 ``` Building with stack ``` $ stack init --resolver=lts-8 --solver $ stack build ``` Note that if you're using a *nightly* resolver that you'll need to work around a bug in stack by manually installing `alex` and `happy`. 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= IRCPASSWORD= ``` 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](http://hackage.haskell.org/package/config-value) ``` -- vim: filetype=config-value -- Grab the Vim syntax highlighting file from the config-value package -- Learn more about these settings with `glirc2 --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: yes-insecure or no -- enabling tls automatically uses port 6697 tls-client-cert: "/path/to/cert.pem" tls-client-key: "/path/to/cert.key" -- Override the defaults when connecting to specific servers servers: * name: "fn" hostname: "chat.freenode.net" sasl-username: "someuser" sasl-password: "somepass" socks-host: "socks5.example.com" socks-port: 8080 -- defaults to 1080 * 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, "gnome-open" for GNOME 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. gnome-open on GNOME 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-username` | text | SASL username | | `sasl-password` | text | SASL password (PLAIN mode) | | `sasl-ecdsa-key` | text | Path ecdsa private key file (ECDSA-NIST256P-CHALLENGE mode) | | `tls` | yes/yes-insecure/no | use TLS to connect (insecure mode disables 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 | 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. * `` - Maps to a terminal color * `` - 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 ` - 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 ` - Send the given params to the named extension * `/exec [-n network] [-c channel] ` - 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) Connection commands * `/nick ` - Change nickname * `/away ` - Set away status Window management * `/windows [filter]` - List all open windows (filters: networks, channels, users) * `/focus ` - Change focus to server window * `/focus ` - Change focus to channel window * `/clear [network] [channel]` - Clear contents of current or specified window * `/ignore ` - Toggle ignore of a user * `/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 ` - Join a channel (alias: `/j`) * `/part` - Part from current channel Chat commands * `/msg ` - Send a message on the current server to target * `/notice ` - Send a notice message on the current server to target * `/ctcp ` - Send a ctcp command on the current server to target * `/me ` - Send action message to channel * `/say ` - Send normal message to channel Channel management * `/mode ` - Change modes on the current channel (advanced tab completion) * `/kick ` - Kick a user * `/kickban ` - Kick and ban a user * `/remove` - Gracefully kick a user * `/topic ` - Change the topic (tab completion for topic) * `/invite ` - Invite a user to the current channel Queries * `/who ` - Perform WHO query (use detailed view to see output) * `/whois ` - Perform WHOIS query * `/whowas ` - Perform WHOWAS query * `/ison ` - Perform ISON query * `/userhost ` - Perform USERHOST query * `/links ` - Perform LINKS query * `/time` - Perform TIME query * `/stats ` - Perform STATS query Channel information * `/users` - Show channel user list * `/masks ` - 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 ` - send command to ZNC module without echoing to all clients * `/znc-playback` - ZNC playback module - play everything * `/znc-playback