Simon Ser
aa407a46e6
Get rid of io.EOF errors in logs
...
Closes: https://todo.sr.ht/~emersion/soju/150
2021-10-29 16:03:04 +02:00
Simon Ser
0cd18a78db
Unify BOUNCER ADDNETWORK and CHANGENETWORK
2021-10-29 15:51:13 +02:00
Simon Ser
de38d93085
Always reply ERR_SASLABORTED on SASL abort
...
Some clients (Hexchat) always expect AUTHENTICATE * to succeed with
ERR_SASLABORTED even if SASL hasn't been started.
2021-10-28 11:29:34 +02:00
Simon Ser
9ec1f1a5b0
Add context args to Database interface
...
This is a mecanical change, which just lifts up the context.TODO()
calls from inside the DB implementations to the callers.
Future work involves properly wiring up the contexts when it makes
sense.
2021-10-18 19:15:15 +02:00
Simon Ser
4be6c4b19c
Remove unnecessary downstream cap checks
...
downstreamConn.SendMessage already performs this cap checking.
2021-10-18 09:20:11 +02:00
Simon Ser
1507e88b36
Remove incorrect AWAY TODO in downstreamConn.SendMessage
...
PRIVMSG/NOTICE get RPL_AWAY, not AWAY.
2021-10-18 09:08:52 +02:00
Simon Ser
324d0fb0ac
Unify away-notify and account-notify handling
2021-10-17 21:54:18 +02:00
Simon Ser
455fef2421
Add support for account-notify
2021-10-17 21:54:18 +02:00
Simon Ser
2f495e9768
Remove unused REGISTRATION_IS_COMPLETED in handleMessageUnregistered
...
downstreamConn.handleMessageUnregistered is only called when the
user isn't registered.
2021-10-16 11:42:32 +02:00
Simon Ser
ade59beb8c
Send BOUNCER REGISTRATION_IS_COMPLETED error
2021-10-16 11:41:37 +02:00
Alexey Yerin
3109340651
downstream: handle name=... in BOUNCER
2021-10-14 16:03:14 +02:00
Simon Ser
a9a066faac
Add bouncer MOTD
...
Closes: https://todo.sr.ht/~emersion/soju/137
2021-10-13 10:58:34 +02:00
Simon Ser
e55d0d7552
Stop sending RPL_CREATED
...
There's no point in sending this numeric if it doesn't contain any
useful info.
2021-10-12 19:28:44 +02:00
Simon Ser
6e8b6fa153
Fix printf formatting in error message
2021-10-12 17:36:00 +02:00
Hubert Hirtz
3a171607e0
Correctly send back PRIVMSGs and NOTICEs to self
2021-10-10 12:05:41 +02:00
Hubert Hirtz
d4b7bb02da
Send back TAGMSGs to self
2021-10-10 12:05:41 +02:00
Hubert Hirtz
0fd81f38fa
Dismiss TAGMSGs directed to BouncerServ
2021-10-10 12:05:40 +02:00
Simon Ser
1d56ef19e7
Add WHOIS reply for BouncerServ
2021-10-06 11:50:12 +02:00
Hubert Hirtz
2554c92df7
Allow CAP negotiation to happen with CAP REQ
...
See https://ircv3.net/specs/extensions/capability-negotiation
> Upon receiving either a CAP LS or CAP REQ command during connection
> registration, the server MUST not complete registration until the
> client sends a CAP END command to indicate that capability negotiation
> has ended.
This commit should prevent soju from trying to authenticate the user
prior to having received AUTHENTICATE messages, when the client eagerly
requests capabilities with CAP REQ seeing available capabilities
beforehand with CAP LS.
2021-09-19 16:50:47 +02:00
Simon Ser
0f2f4de275
Send empty history for service
...
Fixes error when fetching chat history for BouncerServ.
2021-09-13 11:36:25 +02:00
Simon Ser
fba1fdb31e
Don't require upstream to be connected for CHATHISTORY
...
Closes: https://todo.sr.ht/~emersion/soju/127
2021-09-13 11:25:38 +02:00
Simon Ser
cd64a7ffda
Split unmarshalEntity into two functions
...
Some command handlers need to unmarshal without requiring the
upstream to be connected.
2021-09-13 11:14:47 +02:00
Simon Ser
c5d5259243
Pass-through CLIENTTAGDENY in ISUPPORT
2021-07-09 22:48:58 +02:00
Simon Ser
a14f646135
Add per-user realname setting
...
This allows users to set a default realname used if the per-network
realname isn't set.
A new "user update" command is introduced and can be extended to edit
other user properties and other users in the future.
2021-06-25 20:33:13 +02:00
Simon Ser
f3f864dddc
Disallow '$' in nicks
2021-06-23 19:54:22 +02:00
Simon Ser
d7b1c5a9a2
Allow admins to broadcast message to all bouncer users
...
Typically done via:
/notice $<bouncer> <message>
Or, for a connection not bound to a specific network:
/notice $* <message>
The message is broadcast as BouncerServ, because that's the only
user that can be trusted to belong to the bouncer by users. Any
other prefix would conflict with the upstream network.
2021-06-23 19:23:09 +02:00
Simon Ser
eca4c41223
Unify downstream PRIVMSG and NOTICE handling
...
We were doing some things wrong here, e.g. not sending echo messages
for NOTICE.
2021-06-23 18:17:30 +02:00
Simon Ser
faa89333bf
Add support for utf8-only
2021-06-15 15:48:10 +02:00
Simon Ser
b609b86f97
Add support for account-tag
2021-06-14 21:44:38 +02:00
Simon Ser
0557ca5871
Don't suggest users to /motd in multi-upstream mode
2021-06-10 12:16:33 +02:00
Simon Ser
2b3782a507
Make user MODE commands fail in multi-upstream mode
...
References: https://todo.sr.ht/~emersion/soju/20
2021-06-10 11:24:10 +02:00
Gregory Anders
0e9ef1f97c
Forward user mode changes in single-upstream mode
...
References: https://todo.sr.ht/~emersion/soju/20
2021-06-10 11:17:00 +02:00
Gregory Anders
2fe0a57e43
Forward MOTD messages downstream
...
The first MOTD upon connection is ignored, but subsequent MOTD messages
(requested by the "MOTD" message from the client, typically using a
/motd command) are forwarded.
2021-06-09 21:29:36 +02:00
Simon Ser
0081c96ec0
Add downstreamConn.SendBatch helper
2021-06-05 12:38:52 +02:00
Simon Ser
bd41e3bd2b
Prune detached channels from CHATHISTORY TARGETS
2021-06-04 11:27:59 +02:00
Simon Ser
18439f0de5
Implement CHATHISTORY TARGETS
...
References: https://github.com/ircv3/ircv3-specifications/pull/450
2021-06-02 20:32:11 +02:00
Simon Ser
0f3dd2f2b1
Forward unknown commands to upstream in single-upstream mode
2021-05-28 11:15:15 +02:00
Simon Ser
517be78868
Reject JOIN with invalid channel names
...
This prevents us from storing typo'ed channel names in the DB.
2021-05-26 11:23:09 +02:00
Simon Ser
7d648f702e
Allow networks to be disabled
2021-05-26 10:51:02 +02:00
Simon Ser
47c514a9cf
Add support for IRCv3 setname
...
References: https://todo.sr.ht/~emersion/soju/41
2021-05-25 20:24:45 +02:00
Simon Ser
4cf9804e89
Vendor BATCH bouncer-networks type
...
And add the prefix throughout the spec, to make it clear the unprefixed
version is not to be used.
2021-05-25 16:56:38 +02:00
Simon Ser
31f2d28508
Introduce the soju.im/bouncer-networks-notify capability
2021-05-25 16:42:51 +02:00
Simon Ser
29ad541ac7
Send network settings in LISTNETWORKS
2021-05-25 16:42:51 +02:00
Simon Ser
60c566e721
Add pass to bouncer network attributes
2021-05-25 16:42:51 +02:00
Simon Ser
db0f745193
Implement the soju.im/bouncer-networks extension
2021-05-25 16:42:51 +02:00
Philip K
b3bc9614f8
Directly return self-messages to user in multi-upstream mode
2021-05-24 13:31:24 +02:00
Simon Ser
68463d3e8b
Pass-through the BOT ISUPPORT token
...
References: https://github.com/ircv3/ircv3-specifications/pull/439
2021-05-24 11:41:04 +02:00
Hubert Hirtz
3b41c87a41
Fix CAP LIST listing disabled capabilities
2021-05-21 10:03:39 +02:00
Simon Ser
ec26117c08
Relay self-WHO/WHOIS in single-upstream mode
...
In multi-upstream mode, we can't relay WHO/WHOIS messages for the
current user, because we can't decide which upstream server the
message should be relayed to.
In single-upstream server, we do know which upstream server to use,
so we can just blindly relay the message.
This allows users to send a self-WHO/WHOIS to check their cloak and
other information.
2021-05-20 11:13:14 +02:00
Hubert Hirtz
b078ccaf7a
Implement CHATHISTORY BETWEEN
2021-05-18 10:44:10 +02:00