Commit Graph

70 Commits

Author SHA1 Message Date
Simon Ser fa047123b9 Passthrough some ISUPPORT tokens 2021-03-15 23:41:37 +01:00
Simon Ser c654d2bac4
Format CTCP ACTION messages in logs 2020-08-17 15:01:53 +02:00
Simon Ser c490705fee
Sort and split JOIN messages
Sort channels so that channels with a key appear first. Split JOIN
messages so that we don't reach the message size limit.
2020-07-06 11:06:20 +02:00
Hubert Hirtz dc59263681
Send compact channel name lists
This commit resolves `sendNames`' TODO.
2020-06-30 10:28:05 +02:00
delthas f4e0c51366
Add support for TAGMSG and client message tags
Previously we dropped all TAGMSG as well as any client message tag sent
from downstream.

This adds support for properly forwarding TAGMSG and client message tags
from downstreams and upstreams.

TAGMSG messages are intentionally not logged, because they are currently
typically used for +typing, which can generate a lot of traffic and is
only useful for a few seconds after it is sent.
2020-05-27 23:48:08 +02:00
delthas c88700ef18
Fix parsing MODE messages by updating channel memberships
Previously, we only considered channel modes in the modes of a MODE
messages, which means channel membership changes were ignored. This
resulted in bugs where users channel memberships would not be properly
updated and cached with wrong values. Further, mode arguments
representing entities were not properly marshaled.

This adds support for correctly parsing and updating channel memberships
when processing MODE messages. Mode arguments corresponding to channel
memberships updates are now also properly marshaled.

MODE messages can't be easily sent from history because marshaling these
messages require knowing about the upstream available channel types and
channel membership types, which is currently only possible when
connected. For now this is not an issue since we do not send MODE
messages in history.
2020-05-21 22:36:54 +02:00
delthas 732b581eb2
Add support for multiple user channel memberships
User channel memberships are actually a set of memberships, not a single
value. This introduces memberships, a type representing a set of
memberships, stored as an array of memberships ordered by descending
rank.

This also adds multi-prefix to the permanent downstream and upstream
capabilities, so that we try to get all possible channel memberships.
2020-05-11 12:25:49 +02:00
Simon Ser 2053e62162
Request server-time cap
If the server didn't populate the time tag, do it ourselves.
2020-03-31 19:45:04 +02:00
delthas 3b6e175365
Add upstream RPL_CREATIONTIME support 2020-03-26 22:33:44 +01:00
delthas e19f8aaba4
Add upstream labeled-response capability support 2020-03-25 23:20:56 +01:00
delthas df8bfb75f2
Add upstream batch capability support 2020-03-25 23:16:53 +01:00
delthas 98a95e9955
Add MODE arguments support
- Add RPL_ISUPPORT support with CHANMODES, CHANTYPES, PREFIX parsing
- Add support for channel mode state with mode arguments
- Add upstream support for RPL_UMODEIS, RPL_CHANNELMODEIS
- Request channel MODE on upstream channel JOIN
- Use sane default channel mode and channel mode types
2020-03-25 09:40:08 +01:00
delthas b3ad960529 Add WHOIS support 2020-03-20 10:11:27 +01:00
Simon Ser 166d8b0626
Remove some IRCv3 constants
go-irc v3.1.2 adds some missing IRCv3 constants.
2020-03-19 14:51:45 +01:00
Simon Ser af76c3868a
Add CAP support for downstream connections 2020-03-16 15:05:24 +01:00
Simon Ser f3940117d1
Rename project to soju 2020-03-13 18:13:03 +01:00
Simon Ser 85ffadea33
Update dependencies
go-irc v3.1.1 contains a breaking change.

References: https://github.com/go-irc/irc/issues/76
2020-03-13 16:18:53 +01:00
Simon Ser 03d5600da6
Add support for SASL authentication
We now store SASL credentials in the database and automatically populate
them on NickServ REGISTER/IDENTIFY.

References: https://todo.sr.ht/~emersion/jounce/10
2020-03-13 15:12:44 +01:00
Simon Ser 96653499dc
Add parseMessageParams helper 2020-02-07 12:36:02 +01:00
Simon Ser 7876ddb9c8
Split IRC helpers to separate file 2020-02-06 19:24:32 +01:00