Commit Graph

16 Commits

Author SHA1 Message Date
fox.cpp
203dc3df6a
Implement upstream SASL EXTERNAL support
Closes: https://todo.sr.ht/~emersion/soju/47
2020-06-02 11:24:22 +02:00
Simon Ser
e7e4311160
Remove network.upstream
This is an artifact from when we used locks. No need for this anymore.
2020-04-30 10:25:16 +02:00
Simon Ser
6899e748c6
Abbreviate net status service reply
Don't print the nickname if it's the same as the downstream
connection's.
2020-04-28 16:27:53 +02:00
delthas
7b35757bac Add support for the irc+insecure address scheme
Some servers do not support TLS, or have invalid, expired or self-signed
TLS certificates. While the right fix would be toi contact each server
owner to add support for valid TLS, supporting plaintext upstream
connections is sometimes necessary.

This adds support for the irc+insecure address scheme, which connects to
a network in plain-text over TCP.
2020-04-28 11:41:13 +02:00
delthas
19795a2321 Add support for IRC address schemes
This is preparatory work for adding other connection types to upstream
servers. The service command `network create` now accepts a scheme in
the address flag, which specifies how to connect to the upstream server.

The only supported scheme for now is ircs, which is also the default if
no scheme is specified. ircs connects to a network over a TLS TCP
connection.
2020-04-28 11:41:13 +02:00
delthas
7f74055380 Add support for custom network on-connect commands
Some servers use custom IRC bots with custom commands for registering to
specific services after connection.

This adds support for setting custom raw IRC messages, that will be
sent after registering to a network.

It also adds support for a custom flag.Value type for string
slice flags (flags taking several string values).
2020-04-16 17:38:47 +02:00
Thorben Günther
20a58b1fa3
Allow users to change password in client
Added a BouncerServ command for that.
2020-04-10 10:16:25 +02:00
Simon Ser
70f54f685a
Only print addr if necessary in network status service command 2020-04-05 15:20:13 +02:00
delthas
4bcfeae5a6
Fill all fields of the service user prefix
On some IRC clients, NOTICE messages from a user which does not have a
user or host in its prefix (and therefore only have a Name, and look
like prefixes of servers), are treated as server notices rather than
user notices, and are treated differently. (For that matter, soju also
considers NOTICE messages from users with only a Name in their prefix as
special server messages). On most of these clients, NOTICE messages from
a user are formatted differently and stand out from the large flow of
incoming misceallenous server messages.

This fills the service user with fake User and Host values so that
NOTICE messages from it correctly appear as coming from a user. This
is particularly useful in the context of connection and disconnect
errors NOTICE messages that are broadcast from the service user to all
relevant downstreams.
2020-04-04 17:34:30 +02:00
delthas
8c11205ee6
Send the last error for disconnected networks in network status
This adds support for sending the exact error message of a network when
it is disconnected, in the reply to the service command `network
status`. This lets users easily examine why a network is currently
disconnected.

No lock is needed because all reads and writes of network.lastError are
made in the user goroutine.

Closes: https://todo.sr.ht/~emersion/soju/28
2020-04-04 17:34:12 +02:00
delthas
eb941d2d2b
Send one NOTICE on new upstream disconnect/connect errors
In order to notify the user when we are disconnected from a network
(either due to an error, or due a QUIT), and when we fail reconnecting,
this commit adds support for sending a short NOTICE message from the
service user to all relevant downstreams.

The last error is stored, and cleared on successful connection, to
ensure that the user is *not* flooded with identical connection error
messages, which can often happen when a server is down.

No lock is needed on lastError because it is only read and modified from
the user goroutine.

Closes: https://todo.sr.ht/~emersion/soju/27
2020-04-04 17:33:09 +02:00
Simon Ser
96039320b6
Add "network delete" service command
And add all the infrastructure required to stop and delete networks.

References: https://todo.sr.ht/~emersion/soju/17
2020-04-01 15:40:20 +02:00
Simon Ser
44d808be8d
Add a "network status" command 2020-03-25 22:57:48 +01:00
Simon Ser
448464b0e4
Make BouncerServ commands a tree
For instance, replace "create-network" with "network create".
2020-03-25 21:03:13 +01:00
delthas
37eb162b75 Add create-network bouncer service command 2020-03-19 01:14:44 +01:00
Simon Ser
e3d97bb164
Add basic infrastructure for bouncer service 2020-03-18 12:23:08 +01:00