GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
SRAIN(1) Srain SRAIN(1)

srain - Srain Documentation

Welcome to Srain documentation!

Latest version: version-latest.

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

ci-status doc-status channel

Modern IRC client written in GTK.

Home | Documentation | Source code [image]

pkgstat

  • 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)


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

  • Start Srain
  • Connect to IRC server
  • Predefined Server
  • Custom Server
  • Using Command

Join Channel
  • Directly Join
  • Search Channel
  • Using Command


NOTE:

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


After the install 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.
[image]


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

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 config.

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:

[image]


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

[image]


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.

NOTE:

  • 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:

[image]


Refer to commands-server and commands-connect.

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

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

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:
[image]


Now you should joined the channel:

[image]


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.

[image]


NOTE:

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


Refer to commands-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
  • Pre-built package
  • Build byself

  • Fedora
  • Flatpak
  • Gentoo
  • openSUSE

Windows
  • Pre-built package
  • Build byself

  • macOS
  • BSD
OpenBSD



Name Notes Version
meson Only for Building > 0.45.0
make Optional, only for development
appstream Only for building, on Debian-based distributions
coreutils Only for building
gcc Only for building
pkg-config Only for building
gettext Only for building
glib2
glib-networking Optional, for TLS connection support
gtk+3 >= 3.18
libsoup
libconfig >= 1.5
libsecret
openssl
python-sphinx Optional, for building documentation
adwaita-icon-theme Or 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 https://github.com/SrainApp/srain/archive/1.3.1.tar.gz
$ tar -xvzf 1.3.1.tar.gz
$ cd srain-1.3.1


Or get git version:

$ git clone https://github.com/SrainApp/srain.git
$ cd srain


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


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


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


There is no srain package in the official repository yet.

We provide pre-built deb package that you can get it from Github release page.

Copy the debian folder on srain-contrib to srain folder. Then type following command on your terminal:

$ dpkg-buildpackage -b -us -uc


Note that the dependencies mentioned above also should be installed. The details could be found on debian/crontrol file.

Then install the package (replace package name with the name of your package):

$ sudo apt-get install -f ../srain_1.3.1-1_amd64.deb


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 https://dl.flathub.org/repo/flathub.flatpakrepo
$ 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.

After version-1.1.2, we provide Windows portable binary that you can get it from Github release page.

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.

NOTE:

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]


[1]
https://github.com/Alexpux/MINGW-packages/issues/3939#issuecomment-397988379

WARNING:
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.

  • 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

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 server.auto-run and chat.auto-run configuration items. For more details, please refer to config.

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.

NOTE:

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 '.

NOTE:

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 \\.

Usage:

/reload


Reload user configuration.

Usage:

/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

Arguments:

name: unique name of server

Usage:

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


Create a IRC server and connect to it immediately.

Options:

  • -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

Arguments:

  • host: server host
  • nick: specify nickname

Example:

/connect -real 'I am srainbot' -tls -port 6697 chat.freenode.org srainbot
/connect 127.0.0.1 srainbot


Usage:

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


Ignore/unignore somebody's message.

Options:

-cur: only ignore in current chat

Usage:

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


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

Usage:

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


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

Example:

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


Usage:

/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.

Example:

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


Usage:

/quit [reason]


Quit current server with optional reason.

Usage:

/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

Example:

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


Usage:

/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.

Usage:

/me <message>


Send an action message to the current target.

Usage:

/nick <new_nick>


Change your nickname.

Usage:

/whois <nick>


Get somebody's information on the server.

Usage:

/invite <nick> [channel]


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

Usage:

/kick <nick> [channel] [reason]


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

Usage:

/mode <target> <mode>


Change target 's mode.

Usage:

/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 https://modern.ircdocs.horse/ctcp.html .

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

NOTE:

DCC is not yet supported.


Usage:

/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

Arguments:

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

Usage:

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


Filter message whose content matches specified pattern.

Options:

-cur: only ignore in current chat

Arguments:

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

Example:

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


NOTE:

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


Usage:

/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

Arguments:

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

Options:

-cur: only effects the user under current chat

Example:

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 faq-relay-message-transform see its effect.

NOTE:

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


Usage:

/quote <raw message>


For sending special IRC commands.

New in version 1.2.0.

This command has been dropped since version-1.0.0rc5, please use /filter & /unfilter instead.

This command has been dropped since version-1.0.0rc5, please use /render & /unrender instead.

Srain uses Libconfig to process configuration file.
  • Configuration File
  • Syntax
  • Priority and Fallback
  • All Configurable Items

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.

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)


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
# 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?"
        login:
        {
            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
            # For method "sasl-ecdsa"
            # certificate = ""  # String; Path to login certificate file
        }
        # 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 = [
            "irc.libera.chat:6697"
        ]                           # 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
    },
    {
        name = "GIMPNet"
        addresses = ["irc.gimp.org:6697", "irc.gnome.org:6697"]
        tls = true
        encoding = "utf-8"
    },
    {
        name = "OFTC"
        addresses = ["irc.oftc.net:6697"]
        tls = true
        encoding = "utf-8"
    },
    {
        name = "hackint"
        addresses = ["irc.hackint.org:6697"]
        tls = true
        encoding = "utf-8"
    },
    {
        name = "Rizon"
        addresses = ["irc.rizon.net:6697"]
        tls = true
        encoding = "utf-8"
    },
    {
        name = "DALnet"
        addresses = [
            "irc.dal.net:6697",
            "agility.nl.eu.dal.net:6697",
            "bifrost.ca.us.dal.net:6697",
            "bitcoin.uk.eu.dal.net:6697",
            "choopa.nj.us.dal.net:6697",
            "diamond.hub.dal.net:6697",
            "fidelity.tx.us.dal.net:6697",
            "foxtrot.hub.dal.net:6697",
            "halcyon.il.us.dal.net:6697",
            "hash.ix.nl.dal.net:6697",
            "hoon.ix.au.dal.net:6697",
            "istana.ix.sg.dal.net:6697",
            "jingo.ix.us.dal.net:6697",
            "karsk.ix.eu.dal.net:6697",
            "kiwi.ix.nz.dal.net:6697",
            "koala.vc.au.dal.net:6697",
            "laud.ix.us.dal.net:6697",
            "loyalty.ix.us.dal.net:6697",
            "merlin.hub.dal.net:6697",
            "midnight.hub.dal.net:6697",
            "ninja.hub.dal.net:6697",
            "nonstop.ix.me.dal.net:6697",
            "oi.ix.au.dal.net:6697",
            "oper-e.dal.net:6697",
            "paradigm.hub.dal.net:6697",
            "powertech.no.eu.dal.net:6697",
            "punch.wa.us.dal.net:6697",
            "rangers.ix.us.dal.net:6697",
            "redemption.ix.us.dal.net:6697",
            "renew.hub.dal.net:6697",
            "smurf.hub.dal.net:6697",
            "underworld.se.eu.dal.net:6697",
            "uworld.hub.dal.net:6697"
        ]
        tls = true
        encoding = "utf-8"
    },
    {
        name = "EFnet"
        addresses = [
            "irc.efnet.fr:6667",
            "efnet.port80.se:6697",
            "efnet.portlane.se:6667",
            "irc.du.se:6667",
            "irc.homelien.no:6667",
            "irc.inet.tele.dk:6667",
            "irc.nordunet.se:6667",
            "irc.underworld.no:6667",
            "irc.choopa.net:6697",
            "irc.colosolutions.net:6667",
            "irc.mzima.net:6667",
            "irc.prison.netirc.servercentral.net:6667"
        ]
        tls = false
        encoding = "utf-8"
    },
    {
        name = "IRCnet"
        addresses = [
            "irc.ssl.ircnet.com:6697",
            "irc.ircnet.com:6667",
            "irc.at.ircnet.com:6667",
            "irc.be.ircnet.com:6667",
            "irc.cz.ircnet.com:6667",
            "irc.dk.ircnet.com:6667",
            "irc.ee.ircnet.com:6667",
            "irc.fi.ircnet.com:6667",
            "irc.fr.ircnet.com:6667",
            "irc.de.ircnet.com:6667",
            "irc.hu.ircnet.com:6667",
            "irc.it.ircnet.com:6667",
            "irc.jp.ircnet.com:6667",
            "irc.nl.ircnet.com:6667",
            "irc.no.ircnet.com:6667",
            "irc.pl.ircnet.com:6667",
            "irc.si.ircnet.com:6667",
            "irc.se.ircnet.com:6667",
            "irc.us.ircnet.com:6667"
        ]
        tls = false
        encoding = "utf-8"
    },
    {
        name = "Undernet"
        addresses = [
            "irc.undernet.org:6667",
            "ix1.undernet.org:6667",
            "ix2.undernet.org:6667",
            "ashburn.va.us.undernet.org:6667",
            "bucharest.ro.eu.undernet.org:6667",
            "budapest.hu.eu.undernet.org:6667",
            "chicago.il.us.undernet.org:6667"
        ]
        tls = false
        encoding = "utf-8"
    },
    {
        name = "QuakeNet"
        addresses = [
            "irc.quakenet.org:6667",
            "dreamhack.se.quakenet.org:6667",
            "euroserv.fr.quakenet.org:6667",
            "irc.ipv6.quakenet.org:6667",
            "port80a.se.quakenet.org:6667",
            "port80b.se.quakenet.org:6667",
            "port80c.se.quakenet.org:6667",
            "portlane.se.quakenet.org:6667",
            "servercentral.il.us.quakenet.org:6667",
            "underworld1.no.quakenet.org:6667"
        ]
        tls = false
        encoding = "utf-8"
    },
    {
        name = "freenode"
        addresses = [
            "irc.freenode.net:6697",
            "chat.freenode.net:6697",
            "irc.freenode.org:6697",
            "chat.freenode.org:6697"
        ]
        tls = true
        encoding = "utf-8"
    },
    {
        name = "localhost"
        addresses = ["localhost:6667", "127.0.0.1:6667"]
        tls = false
    }
# TODO: More predefined servers
)


int bus_count = 1;


  • 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
  • ...



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

NOTE:

Customized hot keys will be supported in the future.


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

Click the emoji button or use shortcuts Ctrl+. or Ctrl+;.
[image] Emoji button.UNINDENT

New in version 1.3.

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?

Yes, please refer to install-packages-windows.

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.

[image]


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

[image]


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

Refer to misc-chat-logs.

Please prepend another slash to the message.

Refer to commands-syntax.

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.

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


NOTE:

The content of regular expression depends on your language.


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

NOTE:

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


  • 2021-12-18 Version 1.3.1
  • 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

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


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


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


Bug fixes:
Eliminate GDK warning (#316)


Changed:
  • Add libera.chat IRC network (#311)
  • Updated Dutch translation (b6830e9)

Bug fixes:
Fix windows build (#300, #303)


Features:
Add Ukrainian translations (#292), thanks to @andmizyk

Bug fixes:
Minor fixes (#290)


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)




Bug fixes:
Fix an use-after-free BUG (#267)




NOTE:
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 install-packages-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)


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)


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)


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 install-packages-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)


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 install-packages-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


Changes:
  • Some code cleanup
  • Update ./start documentation

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


NOTE:

1.0.0 is the first stable release of Srain, enjoy!


Features:
  • Activate corresponding buffer when channel URL is clicked (#190)
  • Command alias support (#188)
  • List predefined servers via command, see commands-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)


Added:
  • Regular expression pattern management using commands-pattern command
  • Add command commands-filter for filtering message via pattern
  • Add command commands-render for rendering message via pattern



Changed:
  • Refactor detector module and rename it to render
  • Refactor filter module
  • Change project description



Removed:
  • Drop command commands-rignore
  • Drop command commands-relay




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


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 commands-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 used to show Srain's features, inspried by https://ircv3.net/software/clients.html
  • 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 install-packages-opensuse for details, thanks to @alois
  • Flatpak package is available, please refer to install-packages-flatpak 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 commands-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


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 commands-server and commands-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


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


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


Changed:
  • The third time of refactor ;-)
  • New command parser, for the syntax, refer to commands-syntax.
  • Changed the format of Chat log
  • The commands-relay 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 commands-rignore 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 commands-server for IRC servers management
  • Srain home page is available at: https://srain.im
  • Srain help documentation is available at: https://doc.srain.im

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


Create missing directory: $XDG_CACHE_HOME/srain/avatars

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


  • 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

NOTE:

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


  • Bugs fixed
  • Port to GTK+-3.20

NOTE:

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


  • Implement basic functions of a IRC client
  • Themes: Silver Rain (light)
  • Simple python plugin support:
  • Auto upload image to pastebin (img.vim-cn.org)
  • 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

NOTE:

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


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

Function Support
Auto reconnect Yes
Multiple connection Yes
TLS connection Yes
Nick completion Yes
Ignore and filter Yes
Chat log Yes
Configuration file Yes
Command Yes
mIRC color Yes
Plugin Unavailable

Message Support
ACTION Yes
CLIENTINFO Yes
DCC No
FINGER Yes
PING Yes
SOURCE Yes
TIME Yes
VERSION Yes
USERINFO Yes

Feature Support
CAP v3.1 Yes
CAP v3.2 Yes
cap-notify Yes
account-notify No
account-tag No
away-notify No
batch No
chghost No
echo-message No
extended-join No
invite-notify No
Monitor No
multi-prefix No
SASL v3.1 PLAIN,ECDSA-NIST256P-CHALLENGE
SASL v3.2 PLAIN,ECDSA-NIST256P-CHALLENGE
server-time No
starttls No
sts No
userhost-in-names No

search

Shengyu Zhang

2021, Shengyu Zhang
June 7, 2022 1.3.1

Search for    or go to Top of page |  Section 1 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.