Commit graph

61 commits

Author SHA1 Message Date
Simon Ser
d2bcea8c86 Introduce isMessageBeforeReceipt 2022-02-11 16:37:58 +01:00
Simon Ser
e1bbe34ff2 state: add bouncerNetworks helpers 2022-02-04 14:22:50 +01:00
Simon Ser
b11f58b975 state: fix prefix() call in MODE handler
Lost during a refactoring.

Fixes: ab3d4dd661 ("Refactor ISUPPORT handling")
2021-12-16 23:37:33 +01:00
Simon Ser
4cabae89ff lib/irc: add CapRegistry 2021-12-10 15:34:51 +01:00
Simon Ser
fc93a8cef5 state: fix server bouncerNetID
Ooops.
2021-12-07 13:37:14 +01:00
Simon Ser
f3d38859d3 Move isBouncer props to server state
Avoids having to pass this around.
2021-12-07 13:16:07 +01:00
Simon Ser
ab3d4dd661 Refactor ISUPPORT handling
Add a helper class to parse ISUPPORT tokens. Instead of having
manual ISUPPORT handling all over the place, use pre-processed
values.
2021-12-07 12:09:10 +01:00
Simon Ser
30e3ec392f Update channel join status when kicked 2021-12-04 16:52:38 +01:00
Simon Ser
be08302c1f Add support for draft/account-registration
A new UI to register and verify accounts is added.
2021-11-30 14:59:44 +01:00
Simon Ser
3e2ac307f6 Add post-connect UI to login via SASL
If the server supports SASL and if we aren't logged in with any
account, add a UI to authenticate via SASL. This allows users to
login anonymously then login via SASL.

This will also ease the draft/account-registration implementation.
2021-11-21 16:40:46 +01:00
Simon Ser
0af40a1a8e state: add account to server 2021-11-21 12:13:44 +01:00
Simon Ser
55361c5a2b Store WHO list in RPL_ENDOFWHO
This allows the state-tracker to figure out whether a WHO query
returned no result.
2021-11-10 10:32:23 +01:00
Simon Ser
df29650b98 Always insert non-chathistory messages at the end 2021-11-09 10:49:18 +01:00
Simon Ser
800f5ceb6a Keep track of channel join status
This makes us behave better when we receive a self-PART message
from the server.
2021-11-05 11:49:56 +01:00
Simon Ser
483f0c65b1 Add hint in server operators buffer header 2021-11-01 18:45:16 +01:00
Simon Ser
a1057092e0 state: move in QUIT and NICK update logic 2021-10-23 23:24:11 +02:00
Simon Ser
c4a1f38b33 state: process RPL_NAMREPLY atomically
This allows updating the buf.members map only once when receiving
RPL_ENDOFNAMES, instead of repeatedly re-creating it each time a
RPL_NAMREPLY message is received.
2021-10-23 20:05:07 +02:00
Simon Ser
d9f36c82ba Allow bouncers to set NETWORK in ISUPPORT
This allows bouncers to customize the name they appear with.
2021-10-18 19:51:30 +02:00
Simon Ser
a31976586c Fallback to bouncer network host if name is unset 2021-10-15 18:23:56 +02:00
Simon Ser
bfef13824e Use ISUPPORT NETWORK if user hasn't specified custom name 2021-10-15 14:05:39 +02:00
Simon Ser
a9cfbcd6b6 Fix duplicate declaration in State.handleMessage 2021-09-21 17:24:13 +02:00
Simon Ser
329f9063d0 Add support for WHOX
This allows querying the account of the user.
2021-09-21 16:58:00 +02:00
Simon Ser
d12e1109b3 Add support for account-notify 2021-09-21 14:49:32 +02:00
Simon Ser
11878aaaa9 Add support for extended-join 2021-09-21 14:29:31 +02:00
Simon Ser
3746095175 Update user username/hostname on JOIN 2021-09-21 14:12:07 +02:00
Simon Ser
ecb2ee041b Update user on QUIT and NICK 2021-09-21 14:00:52 +02:00
Simon Ser
c66ce61029 Introduce per-server user map
This allows us to store information about users in a signle place,
instead of putting it in user buffers. This is required to display
metadata about users in the channel members list.
2021-09-21 13:33:15 +02:00
Simon Ser
e7f8620933 Add State.create() 2021-09-21 12:33:22 +02:00
Simon Ser
0137a95268 Add support for chghost
See https://ircv3.net/specs/extensions/chghost
2021-09-06 11:20:33 +02:00
Simon Ser
8a5e52ed9a Rename buffer lastReadReceipt to prevReadReceipt
This field is intentionally behind the latest read receipt. Let's
rename it to make that clearer.
2021-08-24 14:01:57 +02:00
Simon Ser
6e59a77672 Don't drop unread marker in addMessage
Closes: https://todo.sr.ht/~emersion/gamja/76
2021-08-24 13:59:33 +02:00
Simon Ser
e283d9c7ab Add support for MONITOR 2021-08-24 12:53:46 +02:00
Simon Ser
0b3f5ef88b Add irc.forEachChannelModeUpdate helper 2021-06-11 12:54:42 +02:00
Simon Ser
37cff435a3 Move MODE state updates outof App 2021-06-11 12:44:14 +02:00
Simon Ser
d19f127952 Move message key generation to State.addMessage 2021-06-11 10:58:09 +02:00
Simon Ser
8972130252 s/var/let/ 2021-06-10 18:11:11 +02:00
Simon Ser
bf76eaa669 Add State.createServer 2021-06-10 10:54:33 +02:00
Simon Ser
5fcbfa446c Use server buffer if name is unspecified in State.getBuffer 2021-06-10 09:25:17 +02:00
Simon Ser
34078d5da7 Add support for draft/event-playback 2021-06-04 19:45:51 +02:00
Simon Ser
87588abf27 Add State.addMessage 2021-06-04 19:07:14 +02:00
Simon Ser
04362644bf Handle TOPIC in State.handleMessage 2021-06-04 18:57:02 +02:00
Simon Ser
30a345298f Handle JOIN/PART in State.handleMessage 2021-06-04 18:53:06 +02:00
Simon Ser
2af58f8d0b Move createBuffer to State 2021-06-04 18:37:34 +02:00
Simon Ser
2c1bb4ce6a Introduce State.handleMessage
Takes an IRC message, updates the state.

Doesn't yet handle all messages, this will be a step-by-step process.
2021-06-04 18:27:21 +02:00
Simon Ser
4d988cafeb Move some state utilities to state.js 2021-06-04 18:03:03 +02:00
Simon Ser
fe9c483570 s/network/server/
Closes: https://todo.sr.ht/~emersion/gamja/46
2021-06-03 11:46:50 +02:00
Simon Ser
63a71e5f5d Add support for incoming INVITE messages 2021-06-03 11:04:32 +02:00
Simon Ser
e38f35c578 Order buffers by priority in Alt+a 2021-05-31 18:26:04 +02:00
Simon Ser
bc7162ebe2 Pretty-print buffer name in buffer header 2021-05-31 17:39:37 +02:00
Simon Ser
558548e6f7 Fix typo in Unread.union 2021-05-27 22:35:41 +02:00