WeeChat dev news - Tag - ircWeeChat development blog2024-01-22T17:53:19+01:00urn:md5:edd364dae4d94114a2ba146603903683DotclearIRC channels moved to libera.chaturn:md5:65815a7c91ae3f55c006cec7bfa191fb2021-05-29T11:26:00+01:002021-06-12T20:07:00+01:00Sébastien Helleusupportfreenodeircliberasupport <p>Due to the recent events affecting freenode (see references below), the WeeChat official and unofficial channels have moved from freenode to libera.chat:</p>
<ul>
<li>official channels: #weechat, #weechat-fr</li>
<li>non-official channels: #weechat-de, #weechat-fi</li>
<li>off-topic channel: #weechat-offtopic</li>
</ul>
<p>To add a new libera server and connect to it, joining only the English support channel:</p>
<pre>
/server add libera irc.libera.chat/6697 -ssl -autojoin=#weechat
/connect libera
</pre>
<p>To join the French channel as well:</p>
<pre>
/server add libera irc.libera.chat/6697 -ssl -autojoin=#weechat,#weechat-fr
/connect libera
</pre>
<p>If all your freenode channels have moved to libera, you can also rename the server and change the address:</p>
<pre>
/disconnect freenode
/server rename freenode libera
/set irc.server.libera.addresses "irc.libera.chat/6697"
/set irc.server.libera.ssl on
/connect libera
</pre>
<p>See you soon on libera!</p>
<p>References:</p>
<ul>
<li><a href="https://arstechnica.com/gadgets/2021/05/freenode-irc-has-been-taken-over-by-the-crown-prince-of-korea/" title="https://arstechnica.com/gadgets/2021/05/freenode-irc-has-been-taken-over-by-the-crown-prince-of-korea/">https://arstechnica.com/gadgets/202...</a></li>
<li><a href="https://hackaday.com/2021/05/20/freenode-debacle-prompts-staff-exodus-new-network/" title="https://hackaday.com/2021/05/20/freenode-debacle-prompts-staff-exodus-new-network/">https://hackaday.com/2021/05/20/fre...</a></li>
<li><a href="https://www.kline.sh/" title="https://www.kline.sh/">https://www.kline.sh/</a></li>
</ul>Inherited option valuesurn:md5:2b81def58665c73ad7d24f4cd34c16812015-12-25T10:00:00+01:002019-11-04T21:39:03+01:00Sébastien Helleucoreircisetoptionserverset <p>Options can now have a parent option, and the value of option inherits from parent when it is null (if null is allowed).</p>
<p>For now, only IRC server options (<code>irc.server.<name>.xxx</code>) are inheriting from parent options (<code>irc.server_default.<name>.xxx</code>).</p>
<p>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).</p>
<p>Enjoy and Merry Christmas!</p>
<p>Screenshot of this new feature (click for full size):</p>
<p><a href="https://blog.weechat.org/public/weechat_set_inherited_values.png" title="weechat_set_inherited_values.png"><img src="https://blog.weechat.org/public/.weechat_set_inherited_values_m.png" alt="weechat_set_inherited_values.png" style="display:table; margin:0 auto;" title="Inherited option values" /></a></p>Hex dump in IRC raw bufferurn:md5:c5f964a7e844700c512f3f83e61d64f32015-08-24T16:53:00+02:002022-10-22T20:05:29+02:00Sébastien Helleuircdebugirc <p>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.</p>
<p>It is displayed if debug is set with a level >= 2 for the irc plugin, for example: <code>/debug set irc 2</code>.</p>
<p>Screenshot (click for full size):</p>
<p><a href="https://blog.weechat.org/public/weechat_irc_raw_hex_dump.png" title="weechat_irc_raw_hex_dump.png"><img src="https://blog.weechat.org/public/.weechat_irc_raw_hex_dump_m.png" alt="weechat_irc_raw_hex_dump.png" style="display:table; margin:0 auto;" title="Hex dump of IRC raw messages" /></a></p>SASL ECDSA-NIST256P-CHALLENGEurn:md5:69851b540d8a962dfc9dd387a8af606e2015-02-08T20:19:00+01:002022-10-22T20:05:53+02:00Sébastien Helleuircecdsaircsasl <p>The support of a new SASL mechanism called "ecdsa-nist256p-challenge" has been added three weeks ago.<br />
This new mechanism uses a challenge with public/private key, so no password is required to connect.</p>
<p>Instructions to configure and use this mechanism are in user's guide: <a href="https://weechat.org/doc/devel/user/en/#irc_sasl_authentication" hreflang="en">https://weechat.org/doc/devel/user/en/#irc_sasl_authentication</a>.</p>
<p>Important notes:</p>
<ul>
<li>GnuTLS ≥ 3.0.21 is required.</li>
<li>This mechanism can only be used on servers supporting it (for example servers using atheme, like freenode).</li>
</ul>The IRC smart filter... even smarter!urn:md5:f97605e306ebd7f217ac3e2568fe09bd2013-02-17T13:29:00+01:002022-10-22T20:06:18+02:00Sébastien Helleuircfilterircsmart <p>A new option has been added for the IRC smart filter: <code>irc.look.smart_filter_join_unmask</code>, with default value <code>30</code> (in minutes).</p>
<p>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 <code>irc.look.smart_filter_join_unmask</code>). Moreover, nick changes are tracked, and will be unmasked with the join.</p>
<p>Events triggering the unmask of join are: a message (can be CTCP), a notice or an update of topic.</p>Backlog for irc protocol in relayurn:md5:5db7a52e65d562653ded8ec17acc6aa02012-12-24T17:51:00+01:002012-12-24T17:52:51+01:00Sébastien Helleupluginsbacklogcapabilityircrelay <p>Backlog has been added for irc protocol in relay plugin.</p>
<p>The relay plugin now supports server capability "server-time", to include the messages time as tag (not in the message itself).</p>
<p>5 new options have been added:</p>
<ul>
<li>relay.irc.backlog_max_minutes</li>
<li>relay.irc.backlog_max_number</li>
<li>relay.irc.backlog_since_last_disconnect</li>
<li>relay.irc.backlog_tags</li>
<li>relay.irc.backlog_time_format</li>
</ul>
<p>Enjoy, and merry Christmas!</p>Tags in IRC messagesurn:md5:dc8d6fc044c581e87aafb82472aeb7632012-11-27T22:51:00+01:002022-10-22T20:10:50+02:00Sébastien Helleuirccapabilityirctag <p>Tags in IRC messages are now supported (in development version, planned for version 0.4.0), following this specification: <a href="http://ircv3.atheme.org/specification/message-tags-3.2" hreflang="en">http://ircv3.atheme.org/specification/message-tags-3.2</a>.</p>
<p>The tag "time" is now read and is used to set the time for the message displayed.</p>
<p>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:</p>
<pre>/set irc.server.znc.capabilities "znc.in/server-time-iso"</pre>
<p>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".</p>
<p>Some info about capability "server-time": <a href="https://github.com/atheme/ircv3-specifications/blob/master/extensions/server-time-3.2" hreflang="en">https://github.com/atheme/ircv3-specifications/blob/master/extensions/server-time-3.2</a>.</p>Redirection of IRC commandsurn:md5:b8291aa1d6b8c242386e05000606393a2010-11-08T20:00:00+01:002022-10-22T20:07:03+02:00Sébastien Helleuircirc <p>It is now possible to redirect IRC commands to a callback, in plugins/scripts.</p>
<p>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.</p>
<p>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.</p>
<p>You can create your own pattern with signal "irc_redirect_pattern".</p>
<p>Examples of redirection and pattern creation are available in <a href="https://weechat.org/doc/devel/api#hsignal_irc_redirect_command" hreflang="en">WeeChat devel doc</a>.</p>Disable highlights from some nicksurn:md5:9cc9bce958847f2f5579613cbd081b9a2010-10-11T18:30:00+02:002021-03-13T01:36:47+01:00Sébastien Helleucorehighlightirc <p>It is now possible to disable highlights from some nicks, per buffer, or per group of buffers (like IRC servers).</p>
<p>A new buffer property "no<sub>highlight</sub>nicks" has been added. It can be set easily with script <a href="https://weechat.org/scripts/source/stable/buffer_autoset.py">buffer_autoset.py</a>, see <code>/help autosetbuffer</code> for example.</p>
<p>If you have already opened buffer, then script option will not apply immediately to buffers. Then you can use <code>/buffer</code> command to manually set this property on a buffer, for example, to disable highlights from "joe" and "mike" on current buffer:</p>
<pre>/buffer set no<sub>highlight</sub>nicks_add joe,mike</pre>
<p><strong>Updated on 2010-12-02</strong>: this option has been replaced by "hotlist<sub>max</sub>level_nicks", see <a href="https://blog.weechat.org/blog/post/2010/12/02/Max-hotlist-level-for-some-nicks">Max hotlist level for some nicks</a>.</p>SASL authentication with IRC serverurn:md5:00aa885d0f49eb6fa251471bf4cd674d2010-02-19T17:54:00+01:002022-10-22T20:07:18+02:00Sébastien Helleuircircsasl <p>It is now possible to use SASL authentication with IRC server, using two mechanisms: "plain" (default) or "dh-blowfish" (crypted password).</p>
<p>New options have been added to servers:</p>
<ul>
<li>sasl_mechanism: mechanism to use ("plain" or "dh-blowfish")</li>
<li>sasl_timeout: timeout (in seconds) for authentication</li>
<li>sasl_username: username</li>
<li>sasl_password: password</li>
</ul>
<p>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.</p>
<p>If you want to set "dh-blowfish" by default for all servers:</p>
<pre>/set irc.server_default.sasl_mechanism dh-blowfish</pre>New IRC output queue with high priorityurn:md5:3f70491c90623d34f4f5e0e3eada691c2010-01-17T17:06:00+01:002022-10-22T20:08:10+02:00Sébastien Helleuircctcpirc <p>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:</p>
<ul>
<li>queue for user messages or commands, with high priority</li>
<li>queue for other messages, with low priority.</li>
</ul>
<p>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).</p>
<p>Accordingly, anti-flood option has been split into two options:</p>
<ul>
<li><code>irc.network.anti_flood_prio_high</code>: delay between two user messages/commands</li>
<li><code>irc.network.anti_flood_prio_low</code>: delay between two other messages</li>
</ul>New IRC commands allchan and allservurn:md5:0d24ffaf659beb7d7e4e1fc975190e5c2010-01-08T19:02:00+01:002022-10-22T20:08:10+02:00Sébastien Helleuircirc <p>New commands have been added to IRC plugin: <code>/allchan</code> and <code>/allserv</code>.
<br />These commands can execute a command on all buffer of all channels or all servers, with optional exclusion of some channels/servers.</p>
<p>Old commands <code>/amsg</code> and <code>/ame</code> are now replaced by aliases. If you're upgrading from recent version (>= 0.3.0), you have to manually create alias, see page with <a href="https://weechat.org/files/releasenotes/ReleaseNotes-0.3.1.html" hreflang="en">release notes</a>.</p>Target buffer for IRC messagesurn:md5:0f6765efe6a4db5acaee93de3f45a6432010-01-01T14:31:00+01:002022-10-22T20:08:10+02:00Sébastien Helleuircbufferirc <p>New options have been added to choose target buffer for IRC messages.</p>
<p>More info and examples in documentation: <a href="https://weechat.org/doc/devel/user#irc_target_buffer" hreflang="en">https://weechat.org/doc/devel/user#irc_target_buffer</a></p>SSL certificatesurn:md5:3dbc93624c6649c93888928617ea0e1a2009-12-07T07:32:00+01:002017-04-27T14:55:25+02:00Sébastien Helleupluginsircssl <p>New options have been added to check SSL certificates when connecting to IRC servers, thanks to kolter's patch:</p>
<ul>
<li>weechat.network.gnutls_ca_file: path to file with certificate authorities (by default: "%h/ssl/CAs.pem")</li>
<li>irc.server.xxx.ssl_cert: ssl certificate file used to automatically identify your nick (CertFP on oftc for example, see below)</li>
<li>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)</li>
<li>irc.server.xxx.ssl_verify: check that the ssl connection is fully trusted (on by default)</li>
</ul>
<p>Please note that ssl_verify is on by default, so verification is now <strong>stricter</strong>, and may fail even if it was ok with previous versions of WeeChat.</p>
<p><strong>First example:</strong> connect to oftc and check certificate:</p>
<ul>
<li>import certificate:
<ul>
<li>mkdir ~/.weechat/ssl</li>
<li>wget -O ~/.weechat/ssl/CAs.pem http://www.spi-inc.org/ca/spi-cacert.crt</li>
</ul></li>
<li>in weechat:
<ul>
<li>/connect oftc</li>
</ul></li>
</ul>
<p>Note: it is possible to concatenate many CAs in file CAs.pem.</p>
<p><strong>Second example:</strong> connect to oftc using CertFP (certificate to auto identify your nick):</p>
<ul>
<li>create certificate:
<ul>
<li>openssl req -nodes -newkey rsa:2048 -keyout nick.key -x509 -days 365 -out nick.cer</li>
<li>cat nick.cer nick.key > ~/.weechat/ssl/nick.pem</li>
</ul></li>
<li>in weechat:
<ul>
<li>/set irc.server.oftc.ssl_cert "%h/ssl/nick.pem"</li>
<li>/connect oftc</li>
<li>/msg nickserv cert add</li>
</ul></li>
</ul>
<p>For more information, please look at <a href="https://www.oftc.net/NickServ/CertFP">https://www.oftc.net/NickServ/CertFP</a>.</p>IRC CTCP repliesurn:md5:bfdd38cff565cc9a762214514e0de91b2009-09-15T20:00:00+02:002022-10-22T20:08:10+02:00Sébastien Helleuircctcpirc <p>It is now possible to customize CTCP replies, or block some CTCP queries (do not reply).</p>
<p>For example, to customize reply to CTCP "VERSION", use following command:</p>
<pre>/set irc.ctcp.version "I'm running WeeChat $version, it rocks!"</pre>
<p>If you want to block CTCP "VERSION" (do not reply to a query), then set empty string:</p>
<pre>/set irc.ctcp.version ""</pre>
<p>Even unknown CTCP can be customized, for example you can reply to CTCP "BLABLA":</p>
<pre>/set irc.ctcp.blabla "This is my answer to CTCP BLABLA"</pre>
<p>It is possible to customize CTCP for one server only, using its internal name before CTCP name:</p>
<pre>/set irc.ctcp.freenode.version "WeeChat $version (for freenode)"</pre>
<p>If you want to restore standard CTCP reply, then remove option:</p>
<pre>/unset irc.ctcp.version</pre>
<p>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).</p>Support for many proxiesurn:md5:28f3123ad4ee9cb3ab56a87bdb8f10432008-11-23T23:15:00+01:002017-05-07T14:30:56+02:00Sébastien Helleucoreircproxy <p>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.</p>
<p>To create, delete, list proxies, use new <code>/proxy</code> command. New IRC option for each server is <code>irc.server.xxx.proxy = name</code>, where name is the name of proxy to use for connection.</p>
<p>For example, to define a http proxy and use it only on freenode server:</p>
<pre>/proxy add myproxy http sample.host.org 8888
/set irc.server.freenode.proxy "myproxy"</pre>Smart IRC join/part/quit message filterurn:md5:edc38a7f5cdb09c65e693943194888d52008-10-25T19:30:00+02:002022-10-22T20:09:57+02:00Sébastien Helleuircfilterignoreircsmart <p>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).</p>
<p>To enable it, use following commands:</p>
<pre>/set irc.look.smart_filter on
/filter add irc_smart * irc_smart_filter *</pre>
<p>You can setup delay: <code>/set irc.look.smart_filter_delay 5</code></p>
<h4>How does it work?</h4>
<p>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).</p>Ignore command, reloaded!urn:md5:6751365c514db5fc171c14a04d6db5362008-09-04T20:23:00+02:002022-10-23T07:21:18+02:00Sébastien Helleuircignoreircplugin <p>The new /ignore command is now available. You can ignore nicks (or hostnames), using regex.</p>
<p>Note: this command will be improved in near future with more options.</p>
<p>Some exemples (you can find them with <code>/help ignore</code>):</p>
<ul>
<li>ignore nick "toto" everywhere: <code>/ignore add toto</code></li>
<li>ignore host "toto@domain.com" on freenode server: <code>/ignore add toto@domain.com freenode</code></li>
<li>ignore host "toto*@*.domain.com" on freenode/#weechat: <code>/ignore add toto*@*.domain.com freenode #weechat</code></li>
</ul>Filters and tagsurn:md5:0cfc4ed3ebece38b5ba7019c8426c8f62008-03-22T08:43:00+01:002009-01-30T15:03:05+01:00Sébastien Helleucorefilterignoreirctag <p>Filters have been added. This feature replaces old <code>/ignore</code> command for IRC, but is more powerful and is not specific to IRC, it applies on buffer content.
With new <code>/filter</code> command, you can ask WeeChat to filter lines displayed, by tags and/or regular expression on content of line. Unlike old <code>/ignore</code> command, the <code>/filter</code> command only hides lines, they are not removed, and you can see them when you want.</p>
<p>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.</p>
<p>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".</p>
<p>Some examples of filters:</p>
<ul>
<li>filter IRC join/part/quit messages (if you find them boring!): <code>/filter add joinquit * irc_join,irc_part,irc_quit *</code></li>
<li>filter lines containing word "spam": <code>/filter add spamfilter * * spam</code></li>
<li>filter lines containing "weechat sucks" on channel #weechat: <code>/filter add sucks irc.freenode.#weechat * weechat sucks</code></li>
</ul>
<p><br />
You can enable/disable filters by <code>/filter</code> command (look at <code>/help filter</code>) or with shortcut key meta + "=".</p>
<p>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.</p>