Quicklog: timestamp insertion fails on IPv6 addresses
Status: Beta
Brought to you by:
tsaviran
If the quicklog contains unresolved IPv6 addresses, the timestamp insertion at the beginning fails.
Such a message may look like this:
:user!user@a123:bbb:229:0:217:31ff:fe81:8c8 PRIVMSG #miau :blah
miau tries to insert the timestamp at the second colon in the line, which is wrong. It would be correct to search for the first colon after the command.
The attached patch fixes this behavior.
Logged In: YES
user_id=655272
Originator: NO
Actually it's not just IPv6 addresses. A channel name can also contain a colon, we'll have to take care of that too. In fact, it it necessary to treat commands such as PRIVMSG and QUIT differently.
Added to BUGS, will be fixed when I have the time.
Logged In: YES
user_id=970766
Originator: YES
You are right, I did not think about channel names containing a colon.
Is it really necessary to treat QUIT differently than PRIVMSG? According to RFC2812 a space in front of the colon separating params and message is mandatory. Also, a parameter may not start with a colon, so I think looking for the next sequence of " :" after the command would be sufficient to find the right place.
Updated version of the patch, see comment Date: 2008-04-13 00:35
Logged In: YES
user_id=970766
Originator: YES
File Added: patch-miau-qlog-ipv6.2.diff
Logged In: YES
user_id=970766
Originator: YES
This patch still contained a bug, where an action without a message caused a segfault. Updated patch attached.
File Added: patch-miau-qlog-ipv6.3.diff
Fixed in Subversion trunk.