810 Commits

Author SHA1 Message Date
koizumi.aoi
f8789c45a1 Add a 'version' subcommand to suikactl, show version on suika daemon
startup.

Signed-off-by: Aoi K <koizumi.aoi@chaotic.ninja>

git-svn-id: file:///srv/svn/repo/suika/trunk@810 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2023-03-22 12:17:57 +00:00
koizumi.aoi
41abaffd5e Use internal versioning
Signed-off-by: Aoi K <koizumi.aoi@chaotic.ninja>

git-svn-id: file:///srv/svn/repo/suika/trunk@809 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2023-03-22 11:47:03 +00:00
koizumi.aoi
96f31cd0d1 Update go.mod
Signed-off-by: Aoi K <koizumi.aoi@chaotic.ninja>

git-svn-id: file:///srv/svn/repo/suika/trunk@808 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2023-03-22 01:16:21 +00:00
koizumi.aoi
a125e80bd0 Use vanity module path
Signed-off-by: Aoi K <koizumi.aoi@chaotic.ninja>

git-svn-id: file:///srv/svn/repo/suika/trunk@807 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2023-03-21 23:43:07 +00:00
koizumi.aoi
d00c9a97c1 Removed build.sr.ht stuff, update Makefile
Signed-off-by: Aoi K <koizumi.aoi@chaotic.ninja>

git-svn-id: file:///srv/svn/repo/suika/trunk@806 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2023-03-21 11:06:12 +00:00
koizumi.aoi
7dd3f69a74 You know the drill
Signed-off-by: Aoi K <koizumi.aoi@chaotic.ninja>

git-svn-id: file:///srv/svn/repo/suika/trunk@805 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2023-03-21 04:54:42 +00:00
koizumi.aoi
cd99ccc1de Drunk as I like
Signed-off-by: Aoi K <koizumi.aoi@chaotic.ninja>

git-svn-id: file:///srv/svn/repo/suika/trunk@804 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2023-03-21 04:45:19 +00:00
koizumi.aoi
6de8b9c247 Add runit and systemd unit files
Signed-off-by: Aoi K <koizumi.aoi@chaotic.ninja>

git-svn-id: file:///srv/svn/repo/suika/trunk@803 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2023-03-21 03:16:08 +00:00
koizumi.aoi
c00353ac95 Update references
Signed-off-by: Aoi K <koizumi.aoi@chaotic.ninja>

git-svn-id: file:///srv/svn/repo/suika/trunk@802 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2023-03-21 03:06:55 +00:00
koizumi.aoi
56f5116d21 Rename to suika
Signed-off-by: Aoi K <koizumi.aoi@chaotic.ninja>

git-svn-id: file:///srv/svn/repo/suika/trunk@801 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2023-03-21 03:00:04 +00:00
koizumi.aoi
730917adc3 dev: move contrib/znc-import.go to cmd/soju-znc-import
git-svn-id: file:///srv/svn/repo/suika/trunk@800 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2023-03-21 02:29:26 +00:00
koizumi.aoi
5a4d2f9132 Add -v to $GOFLAGS. Scratch the original module URI with another one.
git-svn-id: file:///srv/svn/repo/suika/trunk@799 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2023-03-21 02:20:07 +00:00
koizumi.aoi
49282469d4 dev: move import uris to this repository
git-svn-id: file:///srv/svn/repo/suika/trunk@798 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2023-03-21 01:50:04 +00:00
contact
4c38415d5e contrib/clients: add goguma
git-svn-id: file:///srv/svn/repo/suika/trunk@797 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2022-03-05 22:35:17 +00:00
contact
745c1ed1c3 contrib/clients: warn about catgirl
git-svn-id: file:///srv/svn/repo/suika/trunk@796 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2022-03-05 22:35:17 +00:00
contact
5716e2cdca doc/ext: add README
All authors have acknowledged the dual license.

The second license is the same as the one used by the IRCv3 working
group.

git-svn-id: file:///srv/svn/repo/suika/trunk@795 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2022-03-04 09:36:41 +00:00
contact
f617c794b7 downstream: disallow '.' in nicknames
See [1] and [2].

[1]: https://github.com/ircdocs/modern-irc/pull/148
[2]: eff6dd242b/irc/strings.go (L29)

git-svn-id: file:///srv/svn/repo/suika/trunk@794 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2022-03-03 09:54:21 +00:00
contact
8b3b076e5e downstream: re-format illegalNickChars doc comment
git-svn-id: file:///srv/svn/repo/suika/trunk@793 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2022-03-03 09:53:33 +00:00
contact
2c8867bdb0 downstream: fix network name msimatch check being too strict
The network name can be set via BOUNCER BIND. In that case we
don't want to error out when fallbackNetworkName == "".

git-svn-id: file:///srv/svn/repo/suika/trunk@792 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2022-03-03 08:08:51 +00:00
contact
d2da74aa69 Upgrade dependencies
git-svn-id: file:///srv/svn/repo/suika/trunk@791 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2022-03-03 08:00:36 +00:00
contact
a4fa4b48f7 downstream: fail on client or network name mismatch
This probably indicates a mis-configuration.

git-svn-id: file:///srv/svn/repo/suika/trunk@790 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2022-03-03 07:50:37 +00:00
contact
0327068bdd downstream: be less strict when picking up client name
Allow e.g. the SASL username to contain "username/network" and the
raw username to contain "username@client", for instance.

git-svn-id: file:///srv/svn/repo/suika/trunk@789 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2022-03-03 07:35:34 +00:00
contact
488107b3d4 downstream: panic when registering twice
This would be a soju bug.

git-svn-id: file:///srv/svn/repo/suika/trunk@788 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2022-03-03 07:33:10 +00:00
contact
cd5d76be0e msgstore_fs: fix direct message targets
When fetching messages via draft/chathistory from a conversation
with another user, soju would send the following:

    :sender PRIVMSG sender :hey

instead of

    :sender PRIVMSG recipient :hey

because the file-system message store format doesn't contain the
original PRIVMSG target.

Fix this by doing some guesswork.

git-svn-id: file:///srv/svn/repo/suika/trunk@787 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2022-02-25 20:05:10 +00:00
contact
d09f594aac irc: simplify isHighlight
git-svn-id: file:///srv/svn/repo/suika/trunk@786 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2022-02-25 10:32:09 +00:00
contact
cdb3bfe2a4 irc: add isHighlight tests
git-svn-id: file:///srv/svn/repo/suika/trunk@785 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2022-02-25 10:31:41 +00:00
contact
3dbc059a7b Introduce formatServerTime
It's too easy to forget to convert to UTC.

git-svn-id: file:///srv/svn/repo/suika/trunk@784 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2022-02-16 13:45:09 +00:00
contact
37cc949032 Ignore READ commands for service
git-svn-id: file:///srv/svn/repo/suika/trunk@783 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2022-02-12 18:07:30 +00:00
contact
85d375e157 doc: move read spec to ext/
git-svn-id: file:///srv/svn/repo/suika/trunk@782 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2022-02-11 18:49:21 +00:00
delthas
9b1a5bd469 Add support for the wip soju.im/read capability and READ command
READ lets downstream clients share information between each other about
what messages have been read by other downstreams.

Each target/entity has an optional corresponding read receipt, which is
stored as a timestamp.

- When a downstream sends:
  READ #chan timestamp=2020-01-01T01:23:45.000Z
  the read receipt for that target is set to that date
- soju sends READ to downstreams:
  - on JOIN, if the client uses the soju.im/read capability
  - when the read receipt timestamp is set by any downstream

The read receipt date is clamped by the previous receipt date and the
current time.

git-svn-id: file:///srv/svn/repo/suika/trunk@781 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2022-02-11 18:41:46 +00:00
delthas
81e4b057c5 Fix echo-message for TAGMSG
A previous fix (d4b7bb02da1c) only fixed sending echo-message for
TAGMSG to self. We also need to send echo-message for TAGMSG to
other targets.

Closes: https://todo.sr.ht/~emersion/soju/111

git-svn-id: file:///srv/svn/repo/suika/trunk@780 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2022-02-09 15:58:54 +00:00
contact
71a0ed4052 Fix flags variable name in RPL_WHOREPLY handler
This param doesn't contain modes, it contains user flags (such as
H/G for away status).

git-svn-id: file:///srv/svn/repo/suika/trunk@779 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2022-02-09 14:20:32 +00:00
contact
801dc26f68 Refactor generateWHOXReply
Isolate the field letter -> value logic into a separate function.

git-svn-id: file:///srv/svn/repo/suika/trunk@778 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2022-02-09 14:16:54 +00:00
contact
bef2bfad2b Add context to upstreamConn.register
git-svn-id: file:///srv/svn/repo/suika/trunk@777 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2022-02-08 15:38:34 +00:00
contact
6f8aa7f95a Add context to upstreamConn.runUntilRegistered
git-svn-id: file:///srv/svn/repo/suika/trunk@776 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2022-02-08 15:37:31 +00:00
contact
5e54c4b726 makefile: switch to BSD/GNU make
Let's stop using POSIX make, it's too much of a pain.

git-svn-id: file:///srv/svn/repo/suika/trunk@775 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2022-02-08 15:10:19 +00:00
contact
ec2d1bd2d8 db_postgres: use enum for sasl_mechanism
Ensures only supported mechanisms get stored in the DB.

git-svn-id: file:///srv/svn/repo/suika/trunk@774 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2022-02-08 14:38:41 +00:00
contact
f1b4a2bc79 Forbid empty and flag-looking network names
git-svn-id: file:///srv/svn/repo/suika/trunk@773 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2022-02-07 20:39:39 +00:00
contact
31f8b05eea service: make name arg optional for network commands
Makes commands less verbose.

git-svn-id: file:///srv/svn/repo/suika/trunk@772 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2022-02-07 20:33:16 +00:00
contact
ad8763469f service: switch to -network flag for certfp and sasl commands
Instead of always requiring users to explicitly specify the network
name, guess it from the downstream connection.

Network commands are left as-is because it's not yet clear how to
handle them.

git-svn-id: file:///srv/svn/repo/suika/trunk@771 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2022-02-04 15:47:34 +00:00
contact
6ee303a377 Fix capitalization of handleServiceSASLStatus
git-svn-id: file:///srv/svn/repo/suika/trunk@770 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2022-02-04 14:41:40 +00:00
contact
259caf4a78 Ensure consistent network ordering
Right now there is no consistent ordering in the network list:
no ORDER BY in the DB, and network updates move entries to the end.

Let's always sort by network ID so that users don't see the entries
move around.

I've contemplated sorting by Network.GetName() instead, but:

- Clients have now way to figure out dynamic order changes, e.g.
  when renaming a network.
- Some clients might use ISUPPORT NETWORK when a user hasn't
  explicitly named a network, but soju won't use that for ordering,
  leading to non-alphabetic ordering in the client.

Let's leave it to clients to sort the networks by display name if
they want to.

git-svn-id: file:///srv/svn/repo/suika/trunk@769 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2022-02-04 14:03:13 +00:00
contact
6cbc9f985a Drop user.forEachNetwork
It's a trivial for loop.

git-svn-id: file:///srv/svn/repo/suika/trunk@768 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2022-02-04 13:01:27 +00:00
contact
cf4b0a76c5 Fix incorrect listen addr in error message
The various server goroutines would always capture the last listen
addr in the loop.

git-svn-id: file:///srv/svn/repo/suika/trunk@767 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2022-01-19 21:38:13 +00:00
contact
f7264b0bef Retry on temporary net.Listener failure
Instead of stopping to listen, retry on temporary failure. This
can happen when running out of FDs.

Closes: https://todo.sr.ht/~emersion/soju/183

git-svn-id: file:///srv/svn/repo/suika/trunk@766 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2022-01-19 21:35:46 +00:00
theo
487e4a3232 contrib/clients: Add information about emacs irc clients
git-svn-id: file:///srv/svn/repo/suika/trunk@765 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2022-01-13 15:06:54 +00:00
contact
e1f09398b1 Don't send RPL_NOTOPIC on JOIN
As per https://modern.ircdocs.horse/#join-message

git-svn-id: file:///srv/svn/repo/suika/trunk@764 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2022-01-10 09:37:55 +00:00
chris
8d94f8a743 bump required go version to 1.15
requires functions added to the stdlib in 1.15

downstream.go references tls.Dialer
user.go references Resolver.LookupIP

git-svn-id: file:///srv/svn/repo/suika/trunk@763 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2022-01-03 20:01:44 +00:00
contact
1793b83dc4 Add context to upstreamConn.handleCapAck
git-svn-id: file:///srv/svn/repo/suika/trunk@762 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2021-12-10 11:28:16 +00:00
contact
6de32aea34 Handle upstream multi-line SASL
References: https://todo.sr.ht/~emersion/soju/173

git-svn-id: file:///srv/svn/repo/suika/trunk@761 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2021-12-10 09:46:41 +00:00