srain - Man Page


srain — Srain Documentation

Modern IRC client written in GTK.


Latest version: 2023-03-26 Version 1.5.1.

The source code of this site is hosted on GitHub. If you found any mistake, feel free to file issue or pull request.

Supporting Srain through OpenCollective.

Recnet Posts

All posts… or Feed

All Pages


ci-status docs-status channel

Modern IRC client written in GTK. [image]

Packaging Status



  • Fully open source
  • RFC {1459,2812} compatible
  • Partial IRCv3 support
  • Multi-platform support (Linux, Windows, macOS and BSD)
  • Act like modern IM client

    • Graphical user interface
    • Convenient connection panel
    • Interactive channel search
    • Forward message in one click
    • URL preview
    • Desktop notificaion
    • Special optimization for bridge/relay bot
  • Act like geek IRC client

    • Anything can be done via commands
    • Fine-grained configuration with hot update support
    • Regex based message render and filter mechanisms
    • IPC based plugin system (TODO)

Need Help?

Frequently Asked Questions may be helpful.

Feel free to contact us if you have any question about Srain.

  • IRC Channel: #srain @ Libera Chat
  • Github: file an issue Here


GNU General Public License Version 3

Quick Start

  • Start Srain
  • Connect to IRC server

    • Predefined Server
    • Custom Server
    • Using Command
  • Join Channel

    • Directly Join
    • Search Channel
    • Using Command

For your information, the following screenshots are taken under GNOME 3.34.4 with Wayland backed with Arc GTK theme and Breeze icon theme.

Start Srain

After the Installation of Srain, you will find Srain in your applications list, if not, just type srain in your shell to run it. Then you will see Srain's initial interface.


Connect to IRC server

freenode is a famous IRC network, the official channel of Srain #srain is also hosted on it. Let's start by connecting to freenode.

Predefined Server

Srain has a predefined list of commonly used IRC servers, freenode is one of it. If you want to add server into this list, refer to Configuration Manual.

Click the connection button on the Srain header bar, select the page "Quick Mode", select the item "freenode" from candidate box with label "Server", enter your nickname, then click the "Connect" button:


If everything goes well, Srain should connected to freenode, then your would see some message from freenode's server:


Custom Server

While the server your want to connect to is not listed in the predefined list, switch to the page "Advanced Mode", enter the hostname, port, and etc.


  • If the port is a TLS port, make sure that the option "Use secure connection" is checked.
  • If the server's certificate is untrusted and you insist on continuing, check the option "Do not verify certificate".

Then click the "Connect" button:


Using Command

Refer to /server and /connect.

If you want to automatically execute commands at each time Srain starts, please refer to Playground.

Join Channel

After connecting to freenode, now let's try to join #srain, the official channel of Srain.

Directly Join

While your has a clear channel to join, such as #srain, just click the join button, select the page "Join Channel", enter the channel name in the input entry with label "Channel", then click the "Join" button:


Now you should joined the channel:


Search Channel

While you don't know the exact name of the channel, click the join button, switch to page "Search Channel", click the button with "refresh" icon, Srain should start receiving channel list from server.

Then you can enter the keyword or specify the filter conditions to search channel. For example we enter "#s", select the channel you want to join from channe list, then click "Join" button to join it.



If the channel requires a join password, try double click the row of channel.

Using Command

Refer to /join.


Srain is available on GNU/Linux, Windows, macOS and BSD.

  • Dependencies
  • Building

    • Play with Meson
    • Makefile Helper
  • Distribution Packages

    • GNU/Linux

      • Arch Linux
      • Debian
      • Fedora
      • Flatpak
      • Gentoo
      • openSUSE
    • Windows

      • Pre-built package
      • Build byself
    • macOS
    • BSD

      • OpenBSD


mesonOnly for Building> 0.47.0
makeOptional, only for development
appstreamOnly for building, on Debian-based distributions
coreutilsOnly for building
gccOnly for building
pkg-configOnly for building
gettextOnly for building
glib-networkingOptional, for TLS connection support
gtk+3>= 3.18
libconfig>= 1.5
python-sphinxOptional, for building documentation
adwaita-icon-themeOr other icon themes


You should install the aboved Dependencies on your platform before the following steps.

Firstly, download source code of srain, you can get source code of latest release:

$ wget
$ tar -xvzf 1.5.1.tar.gz
$ cd srain-1.5.1

Or get git version:

$ git clone
$ cd srain

Play with Meson

Srain use Meson with ninja backend as its build system. You can build it via the following commands:

$ meson setup builddir
$ cd builddir
$ ninja

Install(root privileges required):

$ cd builddir
# ninja install

HTML documentation and manpage are built and installed by default, if you don't need them, just set meson option doc_builders to an empty array when setup:

$ meson setup -Ddoc_builders=[] builddir

Makefile Helper

We also provide a simple Makefile helper to simplify meson commands. It is convenient for development.

$ make           # Build srain
$ make build     # Same as above
$ make install   # Install srain to prefix under project root
$ make run       # Run srain with isolated $HOME and XDG Directory
$ make debug     # Same as `make run`, but with GDB attached
$ make inspect   # Same as `make run`, but with GtkInspector
$ make clean     # Remove all compilation and installation result
$ make doc       # View installed HTML documentation

Distribution Packages


Arch Linux

Packages srain and srain-git (git version) are available on AUR, it is quite easy to install using AUR helper(yay as an example):

$ yay -S srain
$ yay -S srain-git # git version

If you are the user of Arch Linux CN Repository, try:

# pacman -S archlinuxcn/srain
# pacman -S archlinuxcn/srain-git # git version


Srain now in offical repository of Debian:

# apt install srain


Srain now in offical repository of fedora, use dnf to install it.

# dnf install srain


cpba is maintaining Flatpak manifest for Srain and The built package is available on Flathub, just execute the following commands to install if you already have flatpak installed:

$ flatpak remote-add --if-not-exists flathub
$ flatpak install flathub im.srain.Srain


Please refers to gentoo portage overlays.


alois is maintaining openSUSE package for Srain, following this link to install it.


Srain requires Windows 7 or later.

Pre-built package

After 2020-08-10 Version 1.1.2, we provide Windows portable binary that you can get it from Github release page.

Build byself

If you want to build Srain on Windows youself, you should use the toolchains provided by MSYS2 project.

Firstly install MSYS2, then open a MSYS2 shell, install the basic build tools:

$ pacman -S base-devel
$ pacman -S mingw-w64-i686-toolchain     # For 32-bit Windows
$ pacman -S mingw-w64-x86_64-toolchain   # For 64-bit Windows

Then download the package script from MinGW PKGBUILD for Srain, run the following commands at the directory of PKGBUILD:

$ MINGW_INSTALLS=mingw32 makepkg-mingw -fsi # For 32-bit Windows
$ MINGW_INSTALLS=mingw64 makepkg-mingw -fsi # For 64-bit Windows

If everything goes well, Srain is installed under your MinGW prefix.


If you suffer the "error while loading shared libraries: xxxx.dll: cannot open shared object file: No such file or directory" problem when running, please run it in cmd but not msys2 shell, and it will show you real missing library. [1]




macOS support of Srain is still experimental.

There is not a distribution package or package script for Srain on macOS, you should build Srain by yourself.

Firstly install Homebrew, run the following commands to install dependencies:

$ brew install coreutils gcc pkg-config # building
$ brew install gettext glib-networking gtk+3 libsoup libconfig openssl adwaita-icon-theme

Next, tell pkg-config where to find the libraries we just installed:

export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:"/usr/local/opt/icu4c/lib/pkgconfig"
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:"/usr/local/opt/openssl@3/lib/pkgconfig"

Then follow the steps in Building.



Please refers to OpenBSD Ports.

Commands Manual

  • Playground
  • Syntax
  • Available Commands

    • /reload
    • /server
    • /connect
    • /ignore & /unignore
    • /query & /unquery
    • /join
    • /part
    • /quit
    • /topic
    • /msg
    • /me
    • /nick
    • /whois
    • /invite
    • /kick
    • /mode
    • /ctcp
    • /pattern
    • /filter & /unfilter
    • /render & /unrender
    • /quote
    • /clear
  • Obsoleted Commands

    • /rignore & /unrignore
    • /relay & /unrelay


User can run commands in two ways, the one way is typing them into the input entry of chat buffer.

The another way is writing the commands to the and configuration items. For more details, please refer to Configuration Manual.


A command is a line of string that has the following format, different elements are separated by whitespace:

/<name|alias> [subcommand] [<option> [value]]... [argument]...

User should use name to invoke a command. The command's name starts with a slash / and doesn't contain any whitespace, such as: /join. Some commands have alias that can be used instead of name, for example, user can use /j instead of /join.


When you want to send a message starts with a slash, please prepend another slash to the message. For example, you want to send "/this is a slash prefixed message", you need to type "//this is a slash prefixed message".

A subcommand is a instruction behind the command name, it is optional.

An option, as its name, is optional too, starts with a hyphen - and may has a value.

option is often used as the switch of a flag or a way to change some default values. For example, The command /connect -tls -port 6697, option -tls is just a flag that tells srain use secure connections with TLS. And -port requires a value, if -port is not specified, program will use the default value 6667. Check /connect for more details.

If a value starts with a hyphen - or contains whitespaces, it should be enclosed by single quotation mark '.


All option should appear behind subcommand (If any), and before argument.

An argument is similar to value, but commonly it doesn't have a default value so it can not be omitted (actually it depends on the implement of the command). If the first argument starts with a hyphen -, it should be enclosed by single quotation mark '. If an argument contains whitespaces, it should be quoted too. Specially, the last argument can contain whitespace without quoted.

If you want to use a single quotation mark in a quoted text, use backslash \ to escape it. For backslash itself, use double backslash \\.

Available Commands




Reload user configuration.



/server [connect|disconnect|list] <name>

Predefined IRC server management.

Sub commands:

  • connect: connect to specified predefined server
  • disconnect: disconnect from specified predefined server
  • list: list all predefined servers


  • name: unique name of server



/connect [-port <port>] [-pwd <password>] [-tls] [-tls-noverify]
    [-user <username>] [-real <realname>] <host> <nick>

Create a IRC server and connect to it immediately.


  • -port: server port, default 6667
  • -pwd: connection password, default empty
  • -tls: use secure connections with TLS
  • -tls-noverify: use TLS connection without certificate verification
  • -user: specify username, default same as nickname
  • -real: specify realname, default same as nickname


  • host: server host
  • nick: specify nickname


/connect -real 'I am srainbot' -tls -port 6697 srainbot
/connect srainbot

/ignore & /unignore


/ignore [-cur] <nick>
/unignore [-cur] <nick>

Ignore/unignore somebody's message.


  • -cur: only ignore in current chat

/query & /unquery


/query|q <nick>
/unquery [nick]

Start/stop private chat with somebody. For /unquery , If no nick is specified, it stops the current private chat.



/join|j <channel>[,<channel>]... [<passwd>[,<passwd>]]...

Join specified channel(s), channels are separated by commas ,.


/join #archinux-cn,#gzlug,#linuxba
/join #channel1,#channe2 passwd1



/part|leave [<channel>[,<channel>]]... [<reason>]

Leave specified channel(s) with optional reason, channels are separated by commas ,. If no channel is specified, it leaves the current channel.


/part #archinux-cn Zzz...
/part #archlinux-cn,#tuna



/quit [reason]

Quit current server with optional reason.



/topic [-rm|<topic>]

Set the current channel's topic. If no topic specified, it just displays the current channel's topic.

  • -rm: remove current channel's topic


# Just view the topic
# Set the topic to "Welcome to Srain!"
/topic Welcome to Srain!
# Clear the topic
/topic -rm



/msg|m <target> <message>

Send message to a target, the target can be channel or somebody's nick. If you want to send a message to channel, you should /join it first.



/me <message>

Send an action message to the current target.



/nick <new_nick>

Change your nickname.



/whois <nick>

Get somebody's information on the server.



/invite <nick> [channel]

Invite somebody to join a channel. If no channel is specified, it falls back to current channel.



/kick <nick> [channel] [reason]

Kick somebody from a channel, with optional reason. If no channel is specified, it falls back to current channel.



/mode <target> <mode>

Change target 's mode.



/ctcp <target> <command> [message]

Send a CTCP request to target. The commonly used commands are: CLIENTINFO, FINGER, PING, SOURCE, TIME, VERSION, USERINFO. For the detail of each command, please refer to .

If you send a CTCP PING request without message, you will get the latency between the target.


DCC is not yet supported.



/pattern add <name> <pattern>
/pattern rm <name>
/pattern list

Regular expression pattern management. The added pattern can be used elsewhere in the application, such as /filter & /unfilter and /render & /unrender.

Sub commands:

  • add: add a pattern with given name
  • rm: remove a pattern with given name
  • list: list all availables patterns


  • name: unique name of pattern
  • pattern: a valid Perl-compatible Regular Expression

/filter & /unfilter


/filter [-cur] <pattern>
/unfilter [-cur] <pattern>

Filter message whose content matches specified pattern.


  • -cur: only ignore in current chat


  • pattern: name of regular expression pattern which is managed by /pattern


This filter message that content is "Why GTK and not Qt?":

/pattern add troll ^Why GTK and not Qt\?$
/filter troll

To cancel the filter of these kind of message, use:

/unfilter troll

Pattern NO NEED to consider the case where the mIRC color code is included in the message.

/render & /unrender


/render [-cur] <nick> <pattern>
/unrender [-cur] <nick> <pattern>

Render message of specific user via specific pattern.

The given pattern should contains specific Named Subpatterns used for capturing message fragment from original message content and become part of rendered message.

There are list of available named subpatterns:

  • (?<sender>): match name of sender, once this subpatterns is matched, the original sender will be displayed as message remark
  • (?<content>): match content of rendered message
  • (?<time>): match time of rendered message


  • nick: nickname of user
  • pattern: name of regular expression pattern which is managed by /pattern


  • -cur: only effects the user under current chat


We assume that there is a IRC bot named "xmppbot". It forwards message between XMPP and IRC. On IRC side, the forwarded message looks like "<xmppbot> [xmpp_user] xmpp_message", you can render it to a more easy-to-read format via the following commands:

/pattern add xmpp \[(?<sender>[^:]+?)\] (?<content>.*)
/render xmppbot xmpp

The forwarded meessage will look like "<xmpp_user> xmpp_message", and the original message sender "xmppbot" will be displayed as message remark. Please refer to What is "relay message transform"? see its effect.


Pattern SHOULD consider the case where the mIRC color code is included in the message.



/quote <raw message>

For sending special IRC commands.

New in version 1.2.0.




Clear all messages in current buffer.

New in version 1.4.

Obsoleted Commands

/rignore & /unrignore

This command has been dropped since 2019-06-14 Version 1.0.0rc5, please use /filter & /unfilter instead.

/relay & /unrelay

This command has been dropped since 2019-06-14 Version 1.0.0rc5, please use /render & /unrender instead.

Configuration Manual

Srain uses Libconfig to process configuration file.

  • Configuration File
  • Syntax
  • Priority and Fallback
  • All Configurable Items

Configuration File

The path of system wide configuration file builtin.cfg depends on the compile flag --sysconfdir, default to be /etc/srain.

The path of user wide configuration file srain.cfg is $XDG_CONFIG_HOME/srain, usually it is ~/.config/srain (~/.var/app/im.srain.Srain for flatpak installs).

The difference between system wide and user wide configuration file is the priority, The user wide configuration always overwrite the one in system wide configuration. For more details about priority, refer to Priority and Fallback.


For the syntax of configuration file, please refer to Libconfig's documentation: Configuration Files

For an example configuration, refer to All Configurable Items.

Priority and Fallback

A group is a collection of configurations. The same group in different place have different priority.

server: { # A top level ``server`` group

    # ...

    user = {}
    default-messages = {}
    irc = {}
    chat = { } # A ``chat`` group directly in ``server``

    chat-list = (
        { }, # A ``chat`` group in ``chat-list``
        # ...

server-list: (
    { }, # A ``server`` group in ``server-list``
    # ...

For example, A server group contains the information(not all) of connection to IRC servers.  server group can appear at the top level of configuration file, or be an element of server-list list with a unique name. The top level server is often used to specify the global configuration, and server-list is used to specify specified IRC servers.

The configuration in server-list can overwrite the top level server, and if an option is not specified in server-list, It will fallback to server.

Another similar group is chat, chat contains configuration of chat panel, such as whether to show topic, whether to save chat log and etc. Every server group can contain a chat group and a chat-list list. Elements in chat-list are also identified with an unique name.

As same as the relationship between top level server and server-list, chat-list is used to specify a specified chat and has higher priority.

As mentioned above, The priority of user configuration is always higher than system's, so we can get the priority sorting of server and chat group:

server-list(user) >
top level server(user) >
server-list(system) >
top level server(system)

chat-list in server-list(user) >
chat in server-list(user) >
chat-list in top level server(user) >
chat in top level server(user) >
chat-list in server-list(system) >
chat in server-list(system) >
chat-list in top level server(system) >
chat in top level server(system)

All Configurable Items

Here is the default system wide configuration file used by Srain, all configurable items are already listed here. you can make a copy as your user configuration file, but note:

  1. User configuration always overwrite system's, if you don't know what does this option means, please remove it from your user configuration rather than overwrite it
  2. The server's name in server-list is unique, please remoeve the duplicated server in server-list before using

    # Srain built-in configuration file
    # Application configuration.
    version = "1.0.0rc5"        # String; Every configuration file should have a
                                # version, altough it is not used yet
    # id = "im.srain.Srain"       # The identifier for Srain
    theme = "default-bubble"    # String; Theme; Available values: default
    csd = true                  # Bool; Whether enable Client-Side Decoration
    send-on-ctrl-enter = false  # Bool; Send messsage on CTRL+Enter pressed
    exit-on-close = false       # Bool; Exit program on main window closed
    auto-connect = []           # String array; Servers that are auto connected
                                # after startup
    server-visibility = true    # Bool; Whether the server buffer is visible
    # If you want to report/fix a bug, terminal log will be helpful.
    log =
        prompt-color = true     # Bool; Colorful output
        prompt-file = false     # Bool; Display the filename of the file which log
                                # statement is located
        prompt-function = true  # Bool; As aboved, function name
        prompt-line = false     # Bool; As aboved, line number
        # String array; Specify the log level of a group of files
        debug-targets   = []    # Files with debug log level
        info-targets    = []    # Files with information log level
        warn-targets    = [""]  # Files with warning log level
        error-targets   = []    # Files with error" log level
    # Global IRC Server configuration, this group can also appear in server-list.
    server =
        auto-join = []  # String array; Chats that are auto joined after server
                        # is created
        auto-run = []   # String array; Commands that are auto run after server
                        # is created
        user =
            nickname = "SrainUser"
            username = "Srain"
            realname = "Can you can a can?"
                method = "none"     # String; Login method; Available values:
                                    # - none: No login method, default value
                                    # - nickserv: Login with NICKSERV command
                                    # - msg-nickserv: Login with /msg NickServ identify
                                    # - sasl-plain: Login with SASL PLAIN mechanism
                                    # - sasl-ecdsa: Login with SASL
                                    #   ECDSA-NIST256P-CHALLENGE mechanism
                                    # - sasl-external: Login with SASL EXTERNAL mechanism
                                    #   (requires a TLS certificate set in the **server**
                                    #   section, not the one just below)
                # For method "sasl-ecdsa"
                # certificate = ""  # String; Path to login ECDSA certificate file, used for
                                    # sasl-ecdsa authentication (**not** sasl-external)
            # Default messages for performing specified action
            part-message = "Leaving."
            kick-message = "Kick."
            away-message = "Away from keyboard."
            quit-message = "El Psy Congroo."
        # Chat configuration, this group can also appear in chat-list.
        chat =
            log = true                      # Bool; Persistent chat log to storage
            notify = true                   # Bool; Send notification when you are
                                            # mentioned by others or receiving any
                                            # ERROR message
            notify-all = true               # Bool; Send notification when receiving
                                            # any PRIVMSG/ACTION/NOTIFY/ERROR message
            show-topic = true               # Bool; Show topic
            show-avatar = false             # Bool; Show user avater
            show-user-list = true           # Bool; Show user list
            render-mirc-color = true        # Bool; Render mirc color
            nick-completion-suffix = ":"    # String; Suffix of completed nick name
                                            # e.g. "nick: msg"
            preview-url = true          # Bool; Show previewer for every URL
            auto-preview-url = true     # Bool; Automatically preview supported URL
            auto-run = []   # String array; Commands that are auto run after
                            # chat is created
        # Specified chat configuration, every element in list should have a unique
        # ``name``.
        chat-list =
                # ``name`` is necessary for a ``chat`` group in ``chat-list``.
                name = "#srain"
                show-topic = true
    # Specified server configuration, every element in list should have a unique
    # "name".
    server-list =
            # ``name``, ``addresses`` are necessary for a ``server`` group
            # in ``server-list``, otherwise you can not connect to it.
            name = "Libera Chat"        # String; The unique name of server
            addresses = [
            ]                           # String array; Addresses of IRC server,
                                        # each address follows the format of
                                        # <host>[:<port>]. The port can be omitted,
                                        # default 6667 for non-TLS and 6697 for TLS
            tls = true                  # Bool; Connect with TLS encryption
            # tls-noverify = false      # Bool; Connect with TLS encryption but without
                                        # certificate verification, only used while
                                        # connecting to a self-signed certificate
                                        # verified server
            encoding = "utf-8"          # String; Encoding of IRC server, to get
                                        # all available value of encoding, check the
                                        # output of ``iconv --list``
            # ipv6 = false              # Use IPv6 connection, not yet supported
            # certificate = "/home/you/.config/srain/libera.pem"
                                        # Client TLS certificate, that can be used for
                                        # authentication with CertFP or SASL EXTERNAL (if
                                        # ``method = "sasl-external"`` is set in the
                                        # ``user`` configuration)
            name = "GIMPNet"
            addresses = ["", ""]
            tls = true
            encoding = "utf-8"
            name = "OFTC"
            addresses = [""]
            tls = true
            encoding = "utf-8"
            name = "hackint"
            addresses = [""]
            tls = true
            encoding = "utf-8"
            name = "Rizon"
            addresses = [""]
            tls = true
            encoding = "utf-8"
            name = "DALnet"
            addresses = [
            tls = true
            encoding = "utf-8"
            name = "EFnet"
            addresses = [
            tls = false
            encoding = "utf-8"
            name = "IRCnet"
            addresses = [
            tls = false
            encoding = "utf-8"
            name = "Undernet"
            addresses = [
            tls = false
            encoding = "utf-8"
            name = "QuakeNet"
            addresses = [
            tls = false
            encoding = "utf-8"
            name = "freenode"
            addresses = [
            tls = true
            encoding = "utf-8"
            name = "localhost"
            addresses = ["localhost:6667", ""]
            tls = false
    # TODO: More predefined servers

Development Specification

int bus_count = 1;

Codeing Style

  • Public header 用 __XXX_H 形式
  • 提倡在作用域开头统一声明变量,而不是即用即声明,方便释放的时候统一处理
  • 缩进:四空格,无 Tab
  • 折行:

    • 头文件中的函数签名可以不折行,其他地方的代码一律小于 80 char per line
    • 参数过长时,从超过长度的第一个参数开始折行,参数无需对齐
    • 太长的字符串可以不折行
    • gtk_widget_class_bind_template_child() 由于实在太长,可以不折行
    • 花括号不换行(除非在 case 中),右圆括号和左花括号之间没有空格(待定)
  • 命名:

    • 鼓励局部变量和函数参数使用缩写,全局变量及函数名,类型名不鼓励缩写
    • 宏大写,数据类型,类名用大驼峰法,变量使用全小写 + 下划线
    • 文件名全小写,以下划线分隔
  • 注释:

    • 按英文规范,句首第一个单词首字符大写,多句时使用标点符号,同样每行不得超过 80 字符(汉字以两字符计),链接可以不折行
  • Git commit log: 格式为 MODULE(TYPE): DESCRIPTION ,当前可用的模块(MODULE) 有: All Core Sirc Sui Prefs Filter Decorator Lib I18n Data Plugin Build Script Doc... ,可用的提交类型(TYPE) 有: feat impl change fix improve cleanup refactor update release misc...
  • I18N:所有需要在界面上展示的格式化字符串中的控制字符均使用 numbered argument, 即 %n$X 形式
  • Change log: 应分为四类

    • Changed: 设计或功能上的改动,可能会带来兼容问题的一定要说明
    • Added: 新增的功能或者依赖
    • Removed: 移除的功能或者依赖
    • Imporved: 性能或功能或易用性上的改善以及 bug 修复
  • 发布前须知

    • 集成测试 (TODO)
    • 更新翻译
    • 更新文档
    • 更新 change log
    • 更新项目中的版本号
    • 确认文档中的提供的安装脚本可用
    • 对最新的 commit 打 tag
    • 通知各个发行版的打包维护者

      • Arch Linux: @SilverRainZ
      • Gentoo: @xeirrr
      • ...


Hot Keys

  • ctrl + j/k: switch chat panel
  • up/down: scroll message list

Customized hot keys will be supported in the future.

Chat Logs

Chat logs is enabled by default, log files are located at $XDG_DATA_HOME/srain/logs, usually it is ~/.local/share/srain/logs.

Insert Emojis

Click the emoji button or use shortcuts Ctrl+. or Ctrl+;.

[image] Emoji button.UNINDENT

New in version 1.3.

Frequently Asked Questions

Frequently asked questions are listed here, you can visit issue page to see more questions that asked by our users.

  • Does Srain support Windows?
  • What is "relay message transform"?
  • Where are the log files?
  • How can I send message which has a slash("/") prefixed?
  • How can I remove my stored password?
  • How can I hide JOIN/PART messages of channel?
  • Why can't I login to my ZNC server?

Does Srain support Windows?

Yes, please refer to Windows.

What is “relay message transform”?

There are many relay bots forward messages from other IM to IRC network, "Relay message transform" make these messages easier to read.

For example, there is a telegram bot named "telegram", the words in brackets is the named of the telegram user.


Run command /pattern add normal-relay \[(?<sender>[^:]+?)\] (?<content>.*) and /render telegram normal-relay, you get:


For more details, please refer to commands-pattern and commands-render.

Where are the log files?

Refer to Chat Logs.

How can I send message which has a slash(“/”) prefixed?

Please prepend another slash to the message.

Refer to Syntax.

How can I remove my stored password?

Just leave the password entry empty and check the "Remember password" checkbox before connect to server or join channel, the corresponding password will be removed.

Or you can use secret-tool (provided by libsecret) to manage all your stored passwords.

How can I hide JOIN/PART messages of channel?

So far, Srain has not yet a specialized option for hiding such messages. You can use write regular expression to filter them:

/pattern add filter-join ^\w+ has joined$
/filter filter-join
/pattern add filter-part ^\w+ has left: .*$
/filter filter-part

The content of regular expression depends on your language.

Why can't I login to my ZNC server?

According ZNC's FAQ, way  2, supply your "user@phone/network:pass" (without quotes) in the server password field. Other as usual.


Way 1 in ZNC's FAQ requires username field can be set via connection panel, which will be supported by Srain in the future.

Change Log

  • 2023-03-26 Version 1.5.1
  • 2022-10-02 Version 1.5.0
  • 2022-10-02 Version 1.4.2
  • 2022-10-02 Version 1.3.3
  • 2022-07-30 Version 1.4.1
  • 2022-05-07 Version 1.4.0
  • 2022-02-10 Version 1.3.2
  • 2021-12-18 Version 1.3.1
  • 2021-12-18 Version 1.2.5
  • 2021-09-23 Version 1.3.0
  • 2021-07-18 Version 1.2.4
  • 2021-06-26 Version 1.2.3
  • 2021-05-30 Version 1.2.2
  • 2021-04-02 Version 1.2.1
  • 2021-02-28 Version 1.2.0
  • 2020-10-01 Version 1.1.3
  • 2020-08-10 Version 1.1.2
  • 2020-06-27 Version 1.1.1
  • 2020-05-24 Version 1.1.0
  • 2020-04-11 Version 1.0.2
  • 2020-03-14 Version 1.0.1
  • 2020-02-24 Version 1.0.0
  • 2019-10-07 Version 1.0.0rc9999
  • 2019-06-14 Version 1.0.0rc5
  • 2019-05-13 Version 1.0.0rc4
  • 2019-04-14 Version 1.0.0rc3
  • 2019-01-24 Version 1.0.0rc2
  • 2018-09-10 Version 1.0.0rc1
  • 2018-02-28 Version 0.06.4
  • 2017-12-22 Version 0.06.3
  • 2017-09-12 Version 0.06.2
  • 2017-08-18 Version 0.06.1
  • 2017-07-29 Version 0.06
  • 2016-09-19 Version 0.05.1
  • 2016-08-27 Version 0.05
  • 2016-04-30 Version 0.03
  • 2016-04-13 Version 0.02
  • 2016-04-07 Version 0.01

2023-03-26 Version 1.5.1

  • Bug fixes:

    • Fix the problem that the URL cannot be opened on MS Windows (#391)

2022-10-02 Version 1.5.0

  • Features:

    • Able to identify Nordic GTK Theme as dark theme (#372)
    • Activate the corresponding buffer to a response user query (#381)
  • Changes:

    • No additional sphinx extensions are required to build documentation (#368)
    • Cleanup deprecated APIs (#369)
    • Suppress error message when connection keeps failing (#386)
    • Enable debian release build , thanks to @tomac4t (#387)
  • Bug fixes:

    • Fix SASL authentication error when connecting to Soju (#371)

2022-10-02 Version 1.4.2

  • Backport #371

2022-10-02 Version 1.3.3

  • Backport domain name change, see 2022-05-07 Version 1.4.0
  • Backport #371

2022-07-30 Version 1.4.1

  • Changes:

    • New website, move domain name from to, see Migrate domain name to
    • Require mesion >= 0.47.0

2022-05-07 Version 1.4.0

  • Features:

    • Add support for IRCv3 standard-replies (#354), by @progval
    • Add support for SASL EXTERNAL (#352), by @progval
    • Add support for invite-notify (#359), by @progval
    • Add conf item server-visibility for setting default server visiblity (#361), by @SilverRainZ
    • Add support for server-time (#345), by @progval
    • Add /clear command for clearing messages of current buffer (#268), by @SilverRainZ
  • Bug fixes:

    • Fix workflow for building MS Windows release artifact (#360), by @lifeibiren
  • Changes:

    • Make the buffer menu apply to the right-clicked item instead of the active buffer (#353), by progval
    • Srain now accepting donations through OpenCollective (
    • Disable workflow for building debian release artifact since we have offical debian package (99d9d86)

2022-02-10 Version 1.3.2

  • Features:

    • Add French translation (#351), by @progval
  • Bug fixes:

    • Silence assertion failure on /part command (#348), by @progval
    • Silence "Unknown capability" warning on trailing whitespace (#349), by @progval
  • Changes:

    • Add tooltips to buttons with no text(#350), by @progval
    • Srain is added to offical repository of Debian, see Debian for details

2021-12-18 Version 1.3.1

  • Bug fixes:

    • Fix build of macOS (#339), by @SilverRainZ
    • Make channel messages with origin out of channels can be shown (#336), by @progval
    • Rejoin channels after NICKSERV authentication finishes (#274), by @SilverRainZ

2021-12-18 Version 1.2.5

  • Bug fixes:

    • Backport #336, #274

2021-09-23 Version 1.3.0

  • Features:

    • Implement ISUPPORT parsing + the UTF8ONLY IRCv3 specification (#331), thanks to @progval
    • Add support for RPL_UMODEIS (#331), thanks to @progval
    • Make nick completion case-insensitive (#333), thanks to @progval
    • Add button for inserting emoji (#279)
  • Bug fixes:

    • Fix configuration syntax errors caused by trailing commas (#330), thanks to @progval

2021-07-18 Version 1.2.4

  • Bug fixes:

    • Fix bug casued by #316 (#319)
    • Fix crach when URL preview async task failed (#322)

2021-06-26 Version 1.2.3

  • Bug fixes:

    • Eliminate GDK warning (#316)

2021-05-30 Version 1.2.2

  • Changed:

    • Add IRC network (#311)
    • Updated Dutch translation (b6830e9)
  • Bug fixes:

    • Fix windows build (#300, #303)

2021-04-02 Version 1.2.1

  • Features:

    • Add Ukrainian translations (#292), thanks to @andmizyk
  • Bug fixes:

    • Minor fixes (#290)

2021-02-28 Version 1.2.0

  • Features:

    • Switch build system from Make to Meson (#266)
    • Add FreeBSD implementations for srn_get_executable_{path,dir}, thanks to @wahjava
    • Add /quote command for sending special IRC commands, thanks to @hno (#283)
    • Add support for hiding server buffer (#287)
  • Bug fixes:

    • Fix an use-after-free BUG (#267)
    • Fix implicit declaration error on some systems, thanks to @lgbaldoni (#270)

2020-10-01 Version 1.1.3

  • Bug fixes:

    • Fix an use-after-free BUG (#267)

2020-08-10 Version 1.1.2


This release contains only improvement for MS Windows, user of other platform can ignore it.

  • Features:

    • Binary for MS Windows now can automatically built via Github Actions, thanks to @lifeibiren (#259), please refer to Windows for more details
  • Changes:

    • For ease of running on windows, Srain's executable path is added to the search paths of {configuration,data} file. Thanks to @lifeibiren (#259)

2020-06-27 Version 1.1.1

  • Changes:

    • Improve auto-scroll policy of message list (#255)
  • Bug fixes:

    • Fix TLS certificate verification error on glib-networking 2.64.3 (#251)
    • Fix crash when connecting to an invalid host (#234)

2020-05-24 Version 1.1.0

  • Features:

    • Support multiple selection of message (#138)
    • Support jump to mentioned message (#243)
    • Nickname will be highlighted when mentioned (#243)
    • Auto build deb package (#238)
  • Changes:

    • Improve fcous control of UI
    • Replace appdata with metainfo (#240)
    • Validate metainfo with appstream-util (#242)
  • Bug fixes:

    • Some implicit declarations fixes (#236)
    • Some typo fixes (#239)

2020-04-11 Version 1.0.2

  • Features:

    • Add MAN documentation (deaf723)
    • Add more predefined IRC networks: DALnet, EFnet, IRCnet, Undernet and QuakeNet (#228)
  • Changes:

    • Build: Allow setting CC variable via environment (#224)
    • Add channel related messages to corresponding buffer as possible (#149)
    • Improve widget focus control (#229)
    • Drop unused icons (6239fe5)
    • Provide clearer error message when connecting (#233)
    • Update gentoo installation documentation Gentoo (ceb5ca3)
  • Bug fixes:

    • Truncate long message before sendisg (#227)
    • Deal with invalid UTF-8 string (50e7757)
    • Fix incorrect user number of channel user list (#230)
    • Fix incorrect icon install path (9f07380)

2020-03-14 Version 1.0.1

  • Features:

    • Auto rename to original nick when ghost quit (#198)
    • Add hackint IRC network (#201), thanks to @kpcyrd
    • Add Dutch translation (#215), thanks to @Vistaus
    • Add two FAQs to documentation (#217)
    • Add debian pack script (contrib#1), thanks to @tomac4t. Please refer to Debian to build a deb package
  • Changes:

    • Move continuous integration from travis CI to github actions (#203, #204), thanks to @tomac4t
    • Make header bar buttons repect default belief (#205, #218)
  • Bug fixes:

    • Fix case sensitivity issue for IRC messages (#202), thanks to @hhirtz
    • Fix invalid changelog section of appdata file (#214)
    • Fix missing dependences in documentation (#216), thanks to @avoidr

2020-02-24 Version 1.0.0

  • Changes:

    • Some code cleanup
    • Update Quick Start documentation
  • Bug fixes:

    • Allow Srain runs without dbus secrets service (#195)
    • Fix nick generation logical (39ced08)


1.0.0 is the first stable release of Srain, enjoy!

2019-10-07 Version 1.0.0rc9999

  • Features:

    • Activate corresponding buffer when channel URL is clicked (#190)
    • Command alias support (#188)
    • List predefined servers via command, see /server for details (656f3e5)
  • Changes:

    • Replace all icons with freedesktop standard icons (#120)
  • Bug fixes:

    • Fix wrong usage of GError (#179)
    • Fix image preview problem when image is hard to detect type (#163)
    • Fix memory leak of pattern filter (9464a9e)
    • Fix the breaking "abort sending" icon (#144)
    • Fix the invite menu of user (9f98cbb)

2019-06-14 Version 1.0.0rc5

  • Added:
    • Regular expression pattern management using /pattern command
    • Add command /filter & /unfilter for filtering message via pattern
    • Add command /render & /unrender for rendering message via pattern
  • Changed:
    • Refactor detector module and rename it to render
    • Refactor filter module
    • Change project description
  • Removed:
    • Drop command /rignore & /unrignore
    • Drop command /relay & /unrelay

2019-05-13 Version 1.0.0rc4

  • Added:
    • New dependency libsecret
    • Add password storage support
    • Add command line options --no-auto, used to require Srain not to automatically connect to servers
    • Add russian translation, thanks to @tim77
    • Allow user send slash(/) prefixed message
  • Removed:

    • Drop all password fields in configuration file
  • Changed:

    • Enable CSD(Client-Side Decoration) by default
    • Update chinese translation

2019-04-14 Version 1.0.0rc3

2019-01-24 Version 1.0.0rc2

2018-09-10 Version 1.0.0rc1

2018-02-28 Version 0.06.4

  • Changed:

    • Change default application ID to im.srain.Srain
  • Added:

    • CTCP support, including request & response CLIENTINFO, FINGER, PING, SOURCE, TIME, VERSION, USERINFO messages. DCC message is not yet supported. Use command /ctcp for sending a CTCP request
    • Login method support, you can specify it by configuration file option server.login_method:

      • sasl_plain: SASL PLAIN authentication support, will use server.user.username as identity, and use server.user.passwd as password
    • Added documentation Support Tables used to show Srain's features, inspried by
    • Added a semantic version parser, not yet used
    • Added appdata file which requier by application store, thanks to @cpba
    • openSUSE package is available, please refer to openSUSE for details, thanks to @alois
    • Flatpak package is available, please refer to Fedora for details, thanks to @cpba
  • Improved:

    • Fixed a logical error in IRC message parser: all parameters are equal whether matched by <middle> or <trailing>, thanks to @DanielOaks
    • Improved connection state control, you can smoothly disconnect/quit from server even it is unresponsive
    • Fixed truncated message output by /server list subcommand
    • Fixed crash at g_type_check_instance() under GLib 2.54.3+
    • Fixed: Do not free a SrianServerBuffer which has non-empty buffer
    • Ensure the QUIT message can be sent before application shutdown
    • Removed entry from desktop file, thanks to @TingPing
    • Fixed grammer of join message, thanks to @raindev
    • Re-enable CI for Srain: ci-status

2017-12-22 Version 0.06.3

  • Changed:

    • Configurable file option tls_not_verify in irc block in server block is renamed to tls_noverify, old option name is still supported
    • Command option tls-not-verify for /server and /connect is renamed to tls-noverify, old option name is still supported
  • Added:

    • Connect popover supports connect to predefined server
    • Join popover supports channel search
  • Improved:

    • Modified margin and padding of some widgets
    • Improved the style of unread message counter
    • Fixed markup parse error of decorator
    • Fixed crashing while connecting from connect popover
    • Fixed use after free while removing user
    • Improved the performance and extensibility of user list
    • Improved compatibility with older versions of GTK(> 3.16)
    • Refactor the code of chat panel, helpful for the next development

2017-09-12 Version 0.06.2

  • Added:

    • mIRC color support, can be disabled via setting render_mirc_color option in chat block in server block to false
  • Improved:

    • Better error reporting while operating the UI
    • IRC URL can be opened directly within the application
    • Text in input entry, connection panel and join panel will not be cleared while operation is not successful
    • Fixed: in some cases, nickname registration will case infinity loop
    • Decorator and filter now can process xml message
    • Imporved the handling of channel topic

2017-08-18 Version 0.06.1

  • Added:

    • Added GPL copyright statements
    • RPL_CHANNEL_URL (328) message support
    • Command line options support, type srain -h for help message
    • Support for Creating server and joining channel from IRC URL
    • New dependency libsoup
    • Add reconnect timer: if connection fails, Srain will wait for 5 seconds then try to connect again. If it still fails, waiting time will increase by 5 second
  • Improved:

    • Fixed the crash when QUIT
    • Fixed: avoid sending empty password
    • More empty parameters checks
    • Imporve server connection status control

2017-07-29 Version 0.06

  • Changed:

    • The third time of refactor ;-)
    • New command parser, for the syntax, refer to Syntax.
    • Changed the format of Chat log
    • The /relay & /unrelay command doesn't support custom delimiter, this function will be implemented as python plugin in the future
    • Use reStructuredText for document instead of Markdown
  • Added:

    • Message filter: mechanism for filtering message
    • Message Decorator: mechanism for changing message
    • Install script for Gentoo, thanks to @rtlanceroad !
    • New command /rignore & /unrignore for ignore message using regular expression, thanks to @zwindl !
    • Config file support
    • Configurable log module, more convenient for developing and reporting issue
    • New Return value type, for more friendly error reporting
    • New command /server for IRC servers management
    • Srain home page is available at:


      (expired, use

    • Srain help documentation is available at:


      (expired, use

  • Removed:

    • Remove libircclient dependence
  • Improved:

    • Improve reconnection stuff: auto reconnect when ping time out
    • More accurate message mention
    • Display preview image in correct size
    • Any number of image links in message can be previewed
    • HTTP(and some other protocols) link, domain name, email address and IRC channel name in topic and messages can be rendered as hyper link
    • The sent message can be merged to last sent message
    • Fixed some bugs

2016-09-19 Version 0.05.1

  • Create missing directory: $XDG_CACHE_HOME/srain/avatars

2016-08-27 Version 0.05

  • Changed:

    • Port to libircclient

      • SSL connection support
      • Server password support
      • Channel password support
  • Added:

    • Convenience GtkPopover for connecting and joining
    • Nick popmenu
    • Translations: zh_CN
    • Forward message
    • Chat log
    • Colorful user list icon
    • Mentioned highlight
    • Desktop notification
  • Improved:

    • More friendly User interface
    • Stronger {upload,avatar} plugin
    • Fixed a lot of bugs

2016-04-30 Version 0.03

  • New interface between UI and IRC module
  • Multi-server support
  • Channel name is not case sensitive now
  • /quit command will close all SrainChan of a server
  • Fix GTK-Warning when close a SrainCHan


0.03 is a pre-release, some functions are no completed yet. it also has some undetected bugs.

2016-04-13 Version 0.02

  • Bugs fixed
  • Port to GTK+-3.20


0.02 is a pre-release, some functions are no completed yet. it also has some undetected bugs.

2016-04-07 Version 0.01

  • Implement basic functions of a IRC client
  • Themes: Silver Rain (light)
  • Simple python plugin support:

    • Auto upload image to pastebin (
    • Get github avatar according nickname
    • NB: plugin will separated from this repo in the future
  • Image preview from URL
  • Relay bot message transfrom
  • Nick auto completion
  • Combine message from same person


0.01 is a pre-release, some functions are no completed yet. it also has some undetected bugs.

Support Tables

  • Basic IRC Client Support
  • Client-to-Client Protocol (CTCP) Support
  • IRCv3 Client Support

Basic IRC Client Support

Auto reconnectYes
Multiple connectionYes
TLS connectionYes
Nick completionYes
Ignore and filterYes
Chat logYes
Configuration fileYes
mIRC colorYes

Client-to-Client Protocol (CTCP) Support


IRCv3 Client Support

CAP v3.1Yes
CAP v3.2Yes


Shengyu Zhang


Feb 11, 2024 1.5.1 Srain