WeeChat DevCenter

Tag - irc

Entries feed

Friday, December 25 2015

Inherited option values

Options can now have a parent option, and the value of option inherits from parent when it is null (if null is allowed).

For now, only IRC server options (irc.server.<name>.xxx) are inheriting from parent options (irc.server_default.<name>.xxx).

The command /set shows the inherited value (and the default inherited if the value is set to null). Script iset.pl has been updated as well (version 4.0 supports this feature, and is compatible with old WeeChat).

Enjoy and Merry Christmas!

Screenshot of this new feature (click for full size):


Monday, August 24 2015

Hex dump in IRC raw buffer

Hex dump of IRC messages can now be displayed in raw buffer, this can be useful to debug problems with charsets or some special chars.

It is displayed if debug is set with a level >= 2 for the irc plugin, for example: /debug set irc 2.

Screenshot (click for full size):


Sunday, February 8 2015


The support of a new SASL mechanism called "ecdsa-nist256p-challenge" has been added three weeks ago.
This new mechanism uses a challenge with public/private key, so no password is required to connect.

Instructions to configure and use this mechanism are in user's guide: https://weechat.org/doc/devel/user/en/#irc_sasl_authentication.

Important notes:

  • GnuTLS ≥ 3.0.21 is required.
  • This mechanism can only be used on servers supporting it (for example servers using atheme, like freenode).

Sunday, February 17 2013

The IRC smart filter... even smarter!

A new option has been added for the IRC smart filter: irc.look.smart_filter_join_unmask, with default value 30 (in minutes).

IRC plugin will automatically unmask a filtered join of a nick, if he spoke within N minutes after the join (N being the value of new option irc.look.smart_filter_join_unmask). Moreover, nick changes are tracked, and will be unmasked with the join.

Events triggering the unmask of join are: a message (can be CTCP), a notice or an update of topic.

Monday, December 24 2012

Backlog for irc protocol in relay

Backlog has been added for irc protocol in relay plugin.

The relay plugin now supports server capability "server-time", to include the messages time as tag (not in the message itself).

5 new options have been added:

  • relay.irc.backlog_max_minutes
  • relay.irc.backlog_max_number
  • relay.irc.backlog_since_last_disconnect
  • relay.irc.backlog_tags
  • relay.irc.backlog_time_format

Enjoy, and merry Christmas!

Tuesday, November 27 2012

Tags in IRC messages

Tags in IRC messages are now supported (in development version, planned for version 0.4.0), following this specification: http://ircv3.atheme.org/specification/message-tags-3.2.

The tag "time" is now read and is used to set the time for the message displayed.

The "znc" IRC bouncer is using this tag with the capability "znc.in/server-time-iso" (name should change in the next release). For example if you are using a server called "znc" in WeeChat, you can do:

/set irc.server.znc.capabilities "znc.in/server-time-iso"

Note: with znc 1.0, the server capability was "znc.in/server-time". With znc git > 1.0, the capability is "znc.in/server-time-iso".

Some info about capability "server-time": https://github.com/atheme/ircv3-specifications/blob/master/extensions/server-time-3.2.

Monday, November 8 2010

Redirection of IRC commands

It is now possible to redirect IRC commands to a callback, in plugins/scripts.

First you have to add a hsignal with callback, to receive command output. Then, add redirection by sending a hsignal, and send your command to IRC server. It will automatically use your redirection.

Each redirection uses a pattern, which defines start/stop/extra commands. Default patterns are: ison, list, mode_channel, mode_channel_ban, mode_channel_ban_exception, mode_channel_invite, mode_user, names, ping, time, topic, userhost, who, whois, whowas.

You can create your own pattern with signal "irc_redirect_pattern".

Examples of redirection and pattern creation are available in WeeChat devel doc.

Monday, October 11 2010

Disable highlights from some nicks

It is now possible to disable highlights from some nicks, per buffer, or per group of buffers (like IRC servers).

A new buffer property "no_highlight_nicks" has been added. It can be set easily with script buffer_autoset.py, see /help autosetbuffer for example.

If you have already opened buffer, then script option will not apply immediately to buffers. Then you can use /buffer command to manually set this property on a buffer, for example, to disable highlights from "joe" and "mike" on current buffer:

/buffer set no_highlight_nicks_add joe,mike

Update on 2010-12-02: this option has been replaced by "hotlist_max_level_nicks", see Max hotlist level for some nicks.

Friday, February 19 2010

SASL authentication with IRC server

It is now possible to use SASL authentication with IRC server, using two mechanisms: "plain" (default) or "dh-blowfish" (crypted password).

New options have been added to servers:

  • sasl_mechanism: mechanism to use ("plain" or "dh-blowfish")
  • sasl_timeout: timeout (in seconds) for authentication
  • sasl_username: username
  • sasl_password: password

You just have to setup username (your nick) and password (password of nick) and then connect to server, you'll be identified with SASL if all is ok.

If you want to set "dh-blowfish" by default for all servers:

/set irc.server_default.sasl_mechanism dh-blowfish

Sunday, January 17 2010

New IRC output queue with high priority

A new IRC output queue has been added in irc plugin, with high priority. There are now two queues for messages sent to IRC server:

  • queue for user messages or commands, with high priority
  • queue for other messages, with low priority.

Low priority queue is used to send automatic messages, like replies to CTCP messages. So if you are spamed with CTCP messages, WeeChat will first send your messages (queue with high priority), and then CTCP replies (queue with low priority).

Accordingly, anti-flood option has been split into two options:

  • irc.network.anti_flood_prio_high: delay between two user messages/commands
  • irc.network.anti_flood_prio_low: delay between two other messages

Friday, January 8 2010

New IRC commands allchan and allserv

New commands have been added to IRC plugin: /allchan and /allserv.
These commands can execute a command on all buffer of all channels or all servers, with optional exclusion of some channels/servers.

Old commands /amsg and /ame are now replaced by aliases. If you're upgrading from recent version (>= 0.3.0), you have to manually create alias, see page with release notes.

Friday, January 1 2010

Target buffer for IRC messages

New options have been added to choose target buffer for IRC messages.

More info and examples in documentation: http://weechat.org/files/doc/devel/weechat_user.en.html#irc_target_buffer

Monday, December 7 2009

SSL certificates

New options have been added to check SSL certificates when connecting to IRC servers, thanks to kolter's patch:

  • weechat.network.gnutls_ca_file: path to file with certificate authorities (by default: "%h/ssl/CAs.pem")
  • irc.server.xxx.ssl_cert: ssl certificate file used to automatically identify your nick (CertFP on oftc for example, see below)
  • irc.server.xxx.ssl_dhkey_size: replaces old option weechat.network.gnutls_dh_prime_bitsmax_lines, new default value is 2048 (safer than old default value which was 512)
  • irc.server.xxx.ssl_verify: check that the ssl connection is fully trusted (on by default)

Please note that ssl_verify is on by default, so verification is now stricter, and may fail even if it was ok with previous versions of WeeChat.

First example: connect to oftc and check certificate:

  • import certificate:
    • mkdir ~/.weechat/ssl
    • wget -O ~/.weechat/ssl/CAs.pem http://www.spi-inc.org/ca/spi-cacert.crt
  • in weechat:
    • /connect oftc

Note: it is possible to concatenate many CAs in file CAs.pem.

Second example: connect to oftc using CertFP (certificate to auto identify your nick):

  • create certificate:
    • openssl req -nodes -newkey rsa:2048 -keyout nick.key -x509 -days 365 -out nick.cer
    • cat nick.cer nick.key > ~/.weechat/ssl/nick.pem
  • in weechat:
    • /set irc.server.oftc.ssl_cert "%h/ssl/nick.pem"
    • /connect oftc
    • /msg nickserv cert add

For more information, please look at http://www.oftc.net/oftc/NickServ/CertFP.

Tuesday, September 15 2009

IRC CTCP replies

It is now possible to customize CTCP replies, or block some CTCP queries (do not reply).

For example, to customize reply to CTCP "VERSION", use following command:

/set irc.ctcp.version "I'm running WeeChat $version, it rocks!"

If you want to block CTCP "VERSION" (do not reply to a query), then set empty string:

/set irc.ctcp.version ""

Even unknown CTCP can be customized, for example you can reply to CTCP "BLABLA":

/set irc.ctcp.blabla "This is my answer to CTCP BLABLA"

It is possible to customize CTCP for one server only, using its internal name before CTCP name:

/set irc.ctcp.freenode.version "WeeChat $version (for freenode)"

If you want to restore standard CTCP reply, then remove option:

/unset irc.ctcp.version

Some codes are automatically expanded by WeeChat when replying to CTCP, please read documentation for more information (User's guide, chapter: Plugins / IRC plugin / CTCP replies).

Sunday, November 23 2008

Support for many proxies

Support for many proxies has been added. It's now possible to create many proxies, and assign different proxy (or no proxy) for each IRC server.

To create, delete, list proxies, use new /proxy command. New IRC option for each server is irc.server.xxx.proxy = name, where name is the name of proxy to use for connection.

For example, to define a http proxy and use it only on freenode server:

/proxy add myproxy http sample.host.org 8888
/set irc.server.freenode.proxy "myproxy"

Saturday, October 25 2008

Smart IRC join/part/quit message filter

A new smart filter for IRC join/part/quit message has been added. It is disabled by default (so you'll see all join/part/quit by default).

To enable it, use following commands:
/set irc.look.smart_filter on
/filter add irc_smart * irc_smart_filter *

You can setup delay: /set irc.look.smart_filter_delay 5

How does it work?

When a nick spoke on channel during past X minutes (where X is delay irc.look.smart_filter_delay), its join/part/quit will be displayed by default. Otherwise, if nick did not speak for a long time, all join/part/quit messages will be tagged with "irc_smart_filter". So you have to define a filter on this tag to hide join/part/quit from users that are not speaking on channel (see command above).

Thursday, September 4 2008

Ignore command, reloaded!

The new /ignore command is now available. You can ignore nicks (or hostnames), using regex.

Note: this command will be improved in near future with more options.

Some exemples (you can find them with /help ignore):

  • ignore nick "toto" everywhere: /ignore add toto
  • ignore host "toto@domain.com" on freenode server: /ignore add toto@domain.com freenode
  • ignore host "toto*@*.domain.com" on freenode/#weechat: /ignore add toto*@*.domain.com freenode #weechat

Saturday, March 22 2008

Filters and tags

Filters have been added. This feature replaces old /ignore command for IRC, but is more powerful and is not specific to IRC, it applies on buffer content. With new /filter command, you can ask WeeChat to filter lines displayed, by tags and/or regular expression on content of line. Unlike old /ignore command, the /filter command only hides lines, they are not removed, and you can see them when you want.

To understand filters, you should know what are tags. Each line displayed in a (formated) buffer may have optional tags, which are one or more words for this line. Number of tags is not limited, but should be reasonable (4 or 5 max). Tags are not visible (not displayed in buffer), they are used to filter content of buffers.

IRC plugin uses tags for all messages displayed if they're issued from an IRC server. Tags are: "irc_xxx" where "xxx" is the command received. For example if someone joins IRC channel, line with "--> nick has joined #channel" will have tag "irc_join". For IRC numeric command, tag is "irc_cmd_xxx" where "xxx" is number (3 digits), and second tag is "irc_numeric".

Some examples of filters:

  • filter IRC join/part/quit messages (if you find them boring!): /filter add joinquit * irc_join,irc_part,irc_quit *
  • filter lines containing word "spam": /filter add spamfilter * * spam
  • filter lines containing "weechat sucks" on channel #weechat: /filter add sucks irc.freenode.#weechat * weechat sucks

You can enable/disable filters by /filter command (look at /help filter) or with shortcut key meta + "=".

In a later version, you'll be able to see indicator in status bar, to know if filters are enabled or not, and if something is filtered on current buffer (lines hidden). This will be possible with new bars.