11 Commits

Author SHA1 Message Date
delthas
218af4327e 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).

git-svn-id: file:///srv/svn/repo/suika/trunk@263 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2020-04-16 15:38:47 +00:00
admin
017d8be225 Allow users to change password in client
Added a BouncerServ command for that.

git-svn-id: file:///srv/svn/repo/suika/trunk@252 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2020-04-10 08:16:25 +00:00
contact
60d04d512d Only print addr if necessary in network status service command
git-svn-id: file:///srv/svn/repo/suika/trunk@224 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2020-04-05 13:20:13 +00:00
delthas
ac110eaccc 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.

git-svn-id: file:///srv/svn/repo/suika/trunk@220 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2020-04-04 15:34:30 +00:00
delthas
4ccc12d584 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

git-svn-id: file:///srv/svn/repo/suika/trunk@219 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2020-04-04 15:34:12 +00:00
delthas
c03e14ee9e 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

git-svn-id: file:///srv/svn/repo/suika/trunk@218 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2020-04-04 15:33:09 +00:00
contact
d317a87876 Add "network delete" service command
And add all the infrastructure required to stop and delete networks.

References: https://todo.sr.ht/~emersion/soju/17

git-svn-id: file:///srv/svn/repo/suika/trunk@202 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2020-04-01 13:40:20 +00:00
contact
23af40ce3d Add a "network status" command
git-svn-id: file:///srv/svn/repo/suika/trunk@151 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2020-03-25 21:57:48 +00:00
contact
d64a0f318a Make BouncerServ commands a tree
For instance, replace "create-network" with "network create".

git-svn-id: file:///srv/svn/repo/suika/trunk@150 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2020-03-25 20:03:13 +00:00
delthas
c4fc09cea0 Add create-network bouncer service command
git-svn-id: file:///srv/svn/repo/suika/trunk@120 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2020-03-19 00:14:44 +00:00
contact
0504ff78cf Add basic infrastructure for bouncer service
git-svn-id: file:///srv/svn/repo/suika/trunk@117 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2020-03-18 11:23:08 +00:00