Commit graph

80 commits

Author SHA1 Message Date
Simon Ser
97920ff7f6 Prefix unused variables with an underscore 2024-09-28 21:44:23 +02:00
Simon Ser
6693cc0c78 Remove unused variables 2024-09-28 21:43:23 +02:00
Simon Ser
26792ec386 components/buffer: add human-readable channel mode changes
References: https://todo.sr.ht/~emersion/gamja/162
2024-09-08 12:48:07 +02:00
Simon Ser
6be24e8ed9 lib/irc: unexport STD_MEMBERSHIPS and STD_CHANTYPES 2024-09-07 12:37:10 +02:00
Simon Ser
301f133272 lib/irc: move over STD_MEMBERSHIP_NAMES 2024-09-07 12:36:13 +02:00
Simon Ser
2c0f2a80e9 lib/irc: remove stray hardcoded constant 2024-08-13 00:29:00 +02:00
Simon Ser
6c324d44a1 lib/client: add support for AUTHENTICATE chunking
SASL responses need to be split into 400 byte chunks before being
sent to the server.
2024-06-30 23:44:14 +02:00
Simon Ser
87e88cccca Add support for soju.im/filehost
For now, only handle paste events containing files.

Co-authored-by: Alex McGrath <amk@amk.ie>
2024-04-16 13:22:24 +02:00
Simon Ser
3584c1eb10 lib/irc: fix whitespace RegExp test in isURIPrefix 2024-03-13 15:41:04 +01:00
Simon Ser
2fe2ce6912 lib/irc: fix assignment to undefined variable in isURIPrefix 2024-03-07 23:04:40 +01:00
Simon Ser
57f7b1c011 lib/irc: fix whitespace split in isURIPrefix
We want to get the last index of whitespace, not the first one.
2024-03-07 11:40:37 +01:00
Simon Ser
5d3738bc40 lib/irc: ignore highlights in URLs 2024-03-02 12:36:30 +01:00
Simon Ser
57f64e9cc2 lib/irc: add formatURL 2023-04-19 11:43:45 +02:00
Simon Ser
e7b69cec9a Limit composer length
Often times IRC servers will truncate messages which are too big.
2022-08-28 19:16:41 +02:00
Simon Ser
7138e43710 Ignore RPL_CHANNEL_URL 2022-08-22 10:35:50 +02:00
Simon Ser
6b04cb1417 Add support for bot mode
References: https://ircv3.net/specs/extensions/bot-mode
2022-06-08 15:04:27 +02:00
Simon Ser
e37d5f363b lib/irc: fix bound check in isHighlight
Doesn't seem like this was causing any issues, but let's fix the
logic regardless.
2022-02-25 11:38:00 +01:00
Simon Ser
221b1b6356 lib/irc: remove unnecessary non-breaking-space case
Handled by the default case already.
2022-02-25 11:37:18 +01:00
Simon Ser
86b1030b7a lib/irc: add missing num range to alphaNum regexp 2022-02-25 11:36:43 +01:00
Simon Ser
9e703698ca lib/irc: drop outdated CapRegistry TODO 2022-02-16 15:46:22 +01:00
Simon Ser
bd48f36ade lib/irc: add missing Isupport.chanModes
It was called by forEachChannelModeUpdate, but wasn't implemented.
2022-01-31 18:24:34 +01:00
Simon Ser
4cabae89ff lib/irc: add CapRegistry 2021-12-10 15:34:51 +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
05f7c6e9fe Add Client.join, show join errors in popup 2021-12-04 17:44:23 +01:00
Simon Ser
fc8aa30756 lib/client: add generic error handling to roundtrip() 2021-12-04 17:22:36 +01:00
Simon Ser
3e309e9dfe Ignore RPL_AWAY 2021-11-23 17:58:49 +01:00
Simon Ser
be475026c8 lib/irc: fix handling for prefixes without host
name!user is a valid prefix.
2021-11-15 16:05:51 +01:00
Simon Ser
08cd94d775 lib/irc: add "fullname" to isMeaningfulRealname 2021-11-02 18:12:18 +01:00
Simon Ser
49a59077b7 lib/irc: extend parseURL to support flags and skip auth + options 2021-10-20 14:33:16 +02:00
Simon Ser
12440691c9 Unescape ISUPPORT values
This allows ISUPPORT values to contain spaces.

References: https://github.com/ircdocs/modern-irc/pull/137
2021-10-18 13:29:11 +02:00
Simon Ser
8bdde589bb lib/irc: "unknown" is not a meaningful realname 2021-10-15 17:44:33 +02:00
Simon Ser
a120d79585 Handle IRC URLs without channel name 2021-10-13 16:47:01 +02:00
Simon Ser
405bc51c26 Handle click on irc:// channel URLs inside buffers
References: https://todo.sr.ht/~emersion/gamja/71
2021-10-13 16:18:59 +02:00
Simon Ser
4577f0a27f components/buffer: pretty-print RPL_CHANNELMODEIS and RPL_CREATIONTIME 2021-10-06 12:12:49 +02:00
Simon Ser
19ee5553f6 components/buffer: add RPL_UMODEIS pretty-printing 2021-10-05 11:22:20 +02:00
Simon Ser
184b29b6e3 Hide meaningless real names 2021-09-21 17:24:39 +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
0b0467f019 lib/irc: drop CRLF for outgoing messages
Trailing CRLF must not be included in WebSocket messages.

Closes: https://todo.sr.ht/~emersion/gamja/104
2021-09-18 12:16:54 +02:00
Hubert Hirtz
f78cb8c23b Fix double space introduced before last param 2021-09-17 14:07:58 +02:00
Simon Ser
f17d61ed86 lib/irc: fix formatMessage when last arg starts with colon
Fixes: a51be5037d ("lib/irc: only add colon to trailing arg when necessary")
2021-09-08 10:42:36 +02:00
Simon Ser
a51be5037d lib/irc: only add colon to trailing arg when necessary
This mirrors go-irc's behavior:

7ba1a1858f/parser.go (L374)

Closes: https://todo.sr.ht/~emersion/gamja/103
2021-09-06 10:52:06 +02:00
Simon Ser
e283d9c7ab Add support for MONITOR 2021-08-24 12:53:46 +02:00
Simon Ser
429450e060 Handle RPL_INVITING 2021-06-24 18:01:24 +02:00
Simon Ser
bc05fd5c11 Treat server broadcasts as highlights 2021-06-23 19:52:45 +02:00
Simon Ser
0b3f5ef88b Add irc.forEachChannelModeUpdate helper 2021-06-11 12:54:42 +02:00
Simon Ser
4249da4ba8 Add /quiet and /unquiet 2021-06-11 00:27:19 +02:00
Simon Ser
8972130252 s/var/let/ 2021-06-10 18:11:11 +02:00
Simon Ser
a9c1abb064 Route channel mode and invite/except list to channel buffer 2021-06-07 14:13:00 +02:00
Simon Ser
403d7ec7f7 Add case-mapping support to irc.isHighlight
Closes: https://todo.sr.ht/~emersion/gamja/77
2021-06-06 15:52:58 +02:00
Simon Ser
0dfb7623db Add support for labeled-response
It's just used to avoid mixing up messages coming from the server
so far.
2021-06-04 20:38:01 +02:00