Commit graph

24 commits

Author SHA1 Message Date
Tor Hveem
a527428763
Periodic hotlist sync. Fixes #692
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?
2016-07-29 14:12:46 +02:00
Patrick Melanson
ac2966ff0b Base our time format off of weechat's config 2016-07-20 11:57:20 -04:00
Patrick Melanson
37ba46d379 Extended fetchConfValue with callbacks 2016-07-20 11:57:13 -04:00
Lorenz Hübschle-Schneider
1edba41c4c Add a lock on the connection
This should fix #610 but needs more testing
2016-04-10 11:54:02 +02:00
Tor Hveem
c9dbdc39e4 fetch weechat configuration variables
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.
2015-12-17 17:46:43 +01:00
Tor Hveem
68a766af0a Fix for password error
The old error handler wasn't really working for unknown reasons, but
this seems to fix it.
2015-12-16 14:01:38 +01:00
Lorenz Hübschle-Schneider
507a39f68f Don't show date change message for free buffers
This requires requesting the buffer type and handling the
apropriate event
2015-11-28 20:59:00 +01:00
Tor Hveem
4f686d512d Request nicklist using ptr instead of fullname 2015-11-28 12:29:38 +01:00
pmelanson
643278478f IPv6 address literals won't be surrounded by [ ... ] if it's already there 2015-11-13 20:56:43 +00:00
Tor Hveem
cf771eb73f Merge pull request #620 from glowing-bear/noswitch
Use -noswitch option to open buffers
2015-09-17 09:05:35 +02:00
Angus Gibson
117d9991ec Handle hidden weechat buffers
This adds a new 'hidden' field to the Buffer model, which stays in sync
with weechat's notion of hidden buffers.
2015-07-10 13:52:12 +10:00
Lorenz Hübschle-Schneider
8c965e0b90 Store WeeChat version is an array of numbers 2015-06-10 10:04:10 +02:00
Tor Hveem
2fa229851b Move readmarker too when using new style 2015-04-18 12:11:13 +02:00
Tor Hveem
5099357a8a Better disconnect responsiveness
Instead of waiting for the websocket to really close, which can take a
long time because network latency, weechat inresponsiveness etc, we just
set our status to disconnected when user wants to disconnect, and we let
the websocket handle the close in its own time in the background.

If the user wants to reconnect this means there will be a new websocket
connection before the old one has failed, but this works just fine.
2015-03-27 10:22:42 +01:00
Lorenz Hübschle-Schneider
78b33798c6 Fix commands for buffers whose fullname contain whitespace
Use pointers if Weechat version is recent enough (1.0+).
Otherwise, not marking stuff as read is probably the lesser evil than crashing weechat...
2015-03-26 11:03:50 +01:00
Tor Hveem
feaf76f1ea move hotlistclear into connection
Also some clean up stray debug
2015-03-23 13:33:16 +01:00
Tor Hveem
c71ce1b404 Use new command for "syncing" hotlist.
This patch also implements parsing version message and using that to
check that the WeeChat is new enough to use the new command.
2015-03-21 14:08:09 +01:00
Tor Hveem
cf27b11df3 fixes for reconnect feature
Reinitalise models, and more apply state
2015-03-15 23:58:18 +01:00
Tor Hveem
7029511029 Style the reconnect banner, clean up apply usage 2015-03-14 21:16:45 +01:00
Lorenz Hübschle-Schneider
849da1b5a2 Implement reconnecting upon connection loss
TODO: test in various conditions
2015-02-17 09:42:48 +01:00
David Cormier
933af6a983 Merge pull request #420 from glowing-bear/use-strict
[PLS TEST] Use strict
2014-09-17 09:44:32 -04:00
Lorenz Hübschle-Schneider
121c165a39 Scroll to correct position when fetching more lines
Fixes #406
2014-09-13 18:25:12 +01:00
Lorenz Hübschle-Schneider
a80db339f8 Use strict
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.
2014-09-07 16:55:18 +01:00
Lorenz Hübschle-Schneider
21f8f47efe Split things up into logical blocks 2014-08-31 15:57:36 +01:00