Urgent.News

What's breaking now, across thousands of outlets.

Tech

irken: A tiny hackable full-featured IRC client

Irken is a compact and feature-rich IRC client built using Tcl/Tk. Its primary goal is to faithfully mimic the functionality of IRC while remaining lightweight enough for developers to grasp and modify. The installation process is straightforward on Linux, though Windows compatibility is not anticipated.

Upon launching Irken without any pre-existing configuration files, the application automatically generates a default configuration file at ~/.config/irken/irken.tcl. This file contains a server entry, which can be customized by appending any number of .tcl files to the configuration directory. These files will be executed in alphabetical order, providing a flexible platform for personalizing the client according to the user's preferences.

Every configuration file in the configuration directory should adhere to the standard Tcl format, enabling users to achieve virtually any desired customization. The server ID must not contain spaces, ensuring seamless communication with the IRC server.

Irken also supports custom fonts, allowing users to enhance the visual appeal of their IRC experience. To activate this feature, simply copy the desired font files to the ~/.config/irken/ directory.

One of the key elements of Irken is its plugin architecture, which is implemented as Tcl files loaded on startup. These plugins can install hooks to introduce new commands or respond to incoming messages. Hooks are defined using a specific command format, and each hook is assigned a unique handle for easier identification and modification. The priority of hook execution is crucial, as it determines the order in which hooks are processed.

Irken sets two essential hook priorities: 50 for normal Irken handling and 75 for normal Irken message display. The latter ensures that plugins can intercept and potentially modify messages before they are displayed. All hooks related to normal Irken handling should execute with priority 50, as they are integral to the user interface's functionality.

Messages added to a channel trigger the "tagchantext" hooks, which receive the message text and a list of formatting ranges. These hooks must return using "return -code continue," allowing developers to append new ranges to the original ones.

To gain inspiration for creating custom plugins, users can explore the included plugins within the Irken distribution.

Written by urgent.news from Lobsters's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at codeberg.org →

More in Tech

More from Tuesday 4 August →