Weechat: Incorrect parsing of :trail in some numeric replies and messages

Created on 29 Jan 2019  路  6Comments  路  Source: weechat/weechat

Bug summary

Certain IRC numerics, such as RPL_TOPICTIME and RPL_INVITING, and messages such as MODE from the server may have a : before the last parameter. It appears weechat doesn't remove this properly, leading to a blank topic set time, an extra colon when setting modes and an extra colon when inviting a user.
Mode ##channel [+o user :user2] by opuser
Nick has invited OtherNick to :#channel

Steps to Reproduce

  1. Join irc.irc.com/+6697
  2. Join an existing channel
  3. Channel creation time and topic set time are blank

Info

This seems to indicate a deeper issue with the parser, as according to RFC1459, should be treated the same as once the : is removed.

This was first noticed on irc.irc.com as we run InspIRCd v3 which adds a : before the last parameter for all server->client messages, which is valid according to the spec.

Versions

  • WeeChat version:聽2.4-dev
  • OS, distribution and version:聽Ubuntu 16.04
bug

Most helpful comment

This is still happening in 2.4 and 2.5-dev when multiple modes are set.

Here's the raw line sent by inspircd 3.0.0
:[email protected] MODE #team +qo ben :ben

It displays in weechat with the leading : for the last parameter
Mode #team [+qo ben :ben] by ChanServ

In this example, setting -q leaves the nick desynced and without the remaining +o.
/names can fix the desync in this case, but this line still isn't being properly parsed.

All 6 comments

Hi,
I can not reproduce the issue with this server and a test channel.
Please paste here the content of the raw message received, as you can see it in /server raw

09:09:02 --> irc.com :1.chimera.network.irc.com 332 Guest25001 ##ldtest :~-'* This topic requires snoonet
         premium to view *`-~
09:09:02 --> irc.com :1.chimera.network.irc.com 333 Guest25001 ##ldtest
         linuxdaemon!linuxdaemon@snoonet/staff/linuxdaemon :1547830882

Shows as

09:09:02 -- Topic for ##ldtest is "~-'* This topic requires snoonet premium to view *`-~"
09:09:02 -- Topic set by linuxdaemon (linuxdaemon@snoonet/staff/linuxdaemon) on
09:09:04 <-- irc.com MODE ##ldtest
09:09:04 --> irc.com :1.chimera.network.irc.com 324 Guest25001 ##ldtest :+APnprst
09:09:04 --> irc.com :1.chimera.network.irc.com 329 Guest25001 ##ldtest :1465533502



md5-6af98f39f939bc982063ada03e26f108



09:09:02 -- Channel ##ldtest: 14 nicks (8 ops, 0 halfops, 0 voices, 6 normals)
09:09:04 -- Channel created on 



md5-09f9949a8b4cc5f4fbcede0a114d32cb



09:12:12 --> irc.com :1.chimera.network.irc.com 341 Guest25001 gonzobot :##ldtest



md5-6af98f39f939bc982063ada03e26f108



09:12:12 irc.com -- Guest25001 has invited gonzobot to :##ldtest

I checked in source, the colon is supposed to be automatically skipped by WeeChat (which is the case when I test).
It could maybe be caused by a script?
Can you try with a default config, without any script loaded?

According to /script list I have none loaded, however after wiping .weechat and readding the network, it appears to work. Mode parameters are still messed up though.

09:28:32 --> irc.com | :linuxdaemon!linuxdaemon@snoonet/manager/linuxdaemon MODE ##ldtest +v :gonzobot
09:28:32  -- | Mode ##ldtest [+v :gonzobot] by linuxdaemon



md5-ea9af912147e9383ebe57affde4241b9



09:32:50 --> irc.com | :1.chimera.network.irc.com 341 Guest9554 gonzobot :##ldtest



md5-5fb6e7e306e66ec8414f63f48f5e5f81



09:32:50 irc.com  -- | Guest9554 has invited gonzobot to :##ldtest

It appears this issue affects CHGHOST as well

09:46:46 --> irc.com | :[email protected] CHGHOST linuxdaemon :totallynotrobots/bot/TestBot
09:46:46  -- | linuxdaemon___ ([email protected]) has changed host to linuxdaemon@:totallynotrobots/bot/TestBot

This is still happening in 2.4 and 2.5-dev when multiple modes are set.

Here's the raw line sent by inspircd 3.0.0
:[email protected] MODE #team +qo ben :ben

It displays in weechat with the leading : for the last parameter
Mode #team [+qo ben :ben] by ChanServ

In this example, setting -q leaves the nick desynced and without the remaining +o.
/names can fix the desync in this case, but this line still isn't being properly parsed.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

victor-catalyst picture victor-catalyst  路  4Comments

mholt picture mholt  路  4Comments

codedust picture codedust  路  7Comments

NoSuck picture NoSuck  路  4Comments

Strykar picture Strykar  路  4Comments