There is a bug in WeeChat when hdata is null, which happens when the
hotlist is empty (meaning all buffers are read). Our websocket callback
machinery expects every command with id to return data, so this code in
current versions of WeeChat will lead to a slow leak. But I think lots
of things in our code will do this already so I'm not entirely sure it's
too problematic to let this patch go by.
We could use infolists instead of hdata, but that is cumbersome to parse
and less performant for WeeChat, and sends more data over the wire.
I propose we make a separate attempt at cleaning up the callbacks. Since
we store time on them we could have a cleanuptask that looks through
them and deletes old callbacks. Maybe @dcormier could have a look?
after #708 was merged, if a date change message is
injected underneath the read marker the read
marker would be one line too low. Now, the read
marker will adjust properly when a date change
message is injected above and below the read
marker.
thanks lorenzhs for spotting that
Usage: fetchConfValue('weechat.look.buffer_time_format')
will result in models.wconfig['weechat.look.buffer_time_format'] to be
set when the result returns from WeeChat.
Could maybe be extended to also call a callback when it's available if
needed.
For one day later: Friday (November 27) (examples in en-US)
For n>1 days: Friday (November 27, 2 days later)
For n<0 days: Friday (November 27, 1 day before)
For different years: Friday (November 27, 2015, 2156 days later)
Save outgoing /query nicks to a list and then check that list when we
get a buffer title rename and then switch to the buffer if the name
matches any nick in the outgoing list. Reason to use title event instead
of buffer opened event is that buffer open event doesn't contain the
short name. That would require parsing and guessing full names and in
general be more complicated (but maybe more correct)
This patch can be further improved in the future to check for existing
buffers and switch to them if they already exist.
Requires turning IrcUtils into an Angular service, because the global variable
trick won't work with use strict.
Reuse is still easily possible by removing the angular wrapping around it.