528 Commits

Author SHA1 Message Date
contact
d5ca492750 Pass-through the BOT ISUPPORT token
References: https://github.com/ircv3/ircv3-specifications/pull/439

git-svn-id: file:///srv/svn/repo/suika/trunk@528 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2021-05-24 09:41:04 +00:00
contact
b6b214e5e8 readme: link to rendered man page
git-svn-id: file:///srv/svn/repo/suika/trunk@527 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2021-05-23 19:41:01 +00:00
hubert
96082ecef8 Don't forward label tags
We don't want to have the label tag when calling uc.produce, otherwise
downstream will end up with junk labels.

git-svn-id: file:///srv/svn/repo/suika/trunk@526 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2021-05-23 10:32:27 +00:00
contact
acbb420d9c doc/soju.1: document user delete command
git-svn-id: file:///srv/svn/repo/suika/trunk@525 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2021-05-22 08:44:36 +00:00
contact
7225f0f5e9 doc/soju.1: document -connect-command
git-svn-id: file:///srv/svn/repo/suika/trunk@524 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2021-05-22 08:40:36 +00:00
contact
50b5d6c486 readme: add link to IRC channel
git-svn-id: file:///srv/svn/repo/suika/trunk@523 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2021-05-21 22:04:22 +00:00
contact
54f3d31823 readme: move quickstart to dedicated doc page
git-svn-id: file:///srv/svn/repo/suika/trunk@522 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2021-05-21 22:01:06 +00:00
hubert
2b8a6e1a59 Fix CAP LIST listing disabled capabilities
git-svn-id: file:///srv/svn/repo/suika/trunk@521 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2021-05-21 08:03:39 +00:00
contact
de72d133a9 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.

git-svn-id: file:///srv/svn/repo/suika/trunk@520 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2021-05-20 09:13:14 +00:00
contact
692d48de9e Silence net.ErrClosed errors
git-svn-id: file:///srv/svn/repo/suika/trunk@519 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2021-05-19 22:07:44 +00:00
contact
5c822e5b49 contrib/clients: add gamja and senpai
git-svn-id: file:///srv/svn/repo/suika/trunk@518 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2021-05-19 14:42:03 +00:00
contact
b893736c9e Check message stores implement expected interfaces
git-svn-id: file:///srv/svn/repo/suika/trunk@517 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2021-05-18 12:19:34 +00:00
hubert
84c329faff Implement CHATHISTORY BETWEEN
git-svn-id: file:///srv/svn/repo/suika/trunk@516 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2021-05-18 08:44:10 +00:00
contact
0f0bc90e97 Add more context to chathistory errors
git-svn-id: file:///srv/svn/repo/suika/trunk@515 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2021-05-11 10:42:12 +00:00
yyp
547fb73d86 contrib/weechat: fix typo
git-svn-id: file:///srv/svn/repo/suika/trunk@514 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2021-05-03 22:06:02 +00:00
contact
f8965cc888 contrib/weechat: explain how to enable IRCv3 features
git-svn-id: file:///srv/svn/repo/suika/trunk@513 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2021-05-01 16:52:28 +00:00
hubert
fc31a8fa58 Don't directly reply to network-specific NICK
The NICK must only apply to the specific network, not to the downstream
connection.

git-svn-id: file:///srv/svn/repo/suika/trunk@512 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2021-04-30 10:17:23 +00:00
hubert
4c8f7cd0f3 Handle casemapping on BouncerServ
git-svn-id: file:///srv/svn/repo/suika/trunk@511 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2021-04-30 10:10:49 +00:00
yyp
21a44ff840 Makefile: mark soju and sojuctl as .PHONY
Otherwise running `make` didn't do anything on a non-clean state. Go
deals with changed files automatically, and there's no real need to
explicitly specify them.

git-svn-id: file:///srv/svn/repo/suika/trunk@510 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2021-04-27 17:06:16 +00:00
yyp
e92b4b5cdf db: match placeholders with columns
Soju inserts 9 columns but only with 8 placeholders. This causes
channels not being saved properly and also logging errors like this:

    downstream ...: failed to create or update channel ...: 8 values for 9 columns

git-svn-id: file:///srv/svn/repo/suika/trunk@509 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2021-04-27 07:22:44 +00:00
ecs
e3c909c007 handleUserDelete: delete the correct user
Prior to this, we deleted the user issuing the deletion rather than the
user which should've been deleted.

git-svn-id: file:///srv/svn/repo/suika/trunk@508 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2021-04-22 08:37:05 +00:00
contact
7bfba6f771 Make db and log config options more future-proof
Rename the "sql" directive to "db". Rename the "log" directive to
"log fs".

In the future, we'll maybe support more databases and more message
stores. Make it so it's easy to integrate these new festures to the
config file format.

git-svn-id: file:///srv/svn/repo/suika/trunk@507 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2021-04-21 16:15:04 +00:00
contact
3922196855 Add default configuration file
git-svn-id: file:///srv/svn/repo/suika/trunk@506 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2021-04-21 14:39:51 +00:00
hubert
9b274dd916 Drop TAGMSG in detached channels
- Do not relay TAGMSG as notices,
- Do not reattach when a TAGMSG is received,
- Do not reset the detach timer when a TAGMSG is received.

git-svn-id: file:///srv/svn/repo/suika/trunk@505 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2021-04-20 14:17:28 +00:00
contact
da3730a850 readme: mention Makefile, assume soju is installed system-wide
git-svn-id: file:///srv/svn/repo/suika/trunk@504 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2021-04-19 14:35:18 +00:00
contact
01b94a7327 sojuctl: don't use log.Fatalf in readPassword
git-svn-id: file:///srv/svn/repo/suika/trunk@503 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2021-04-19 12:11:25 +00:00
contact
edc4b60e04 Add user prefix to upstream logger
git-svn-id: file:///srv/svn/repo/suika/trunk@502 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2021-04-13 18:16:37 +00:00
contact
5472ad31ca Add per-network logger
git-svn-id: file:///srv/svn/repo/suika/trunk@501 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2021-04-13 18:12:49 +00:00
contact
db50fb13e5 Error out on network name conflict
Closes: https://todo.sr.ht/~emersion/soju/29

git-svn-id: file:///srv/svn/repo/suika/trunk@500 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2021-04-13 17:33:06 +00:00
contact
a958ddadee Relay detached channel backlog as BouncerServ NOTICE if necessary
Instead of ignoring detached channels wehn replaying backlog,
process them as usual and relay messages as BouncerServ NOTICEs
if necessary. Advance the delivery receipts as if the channel was
attached.

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

git-svn-id: file:///srv/svn/repo/suika/trunk@499 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2021-04-13 17:11:05 +00:00
contact
ad0b3e4eb1 Move isHighlight to irc.go
git-svn-id: file:///srv/svn/repo/suika/trunk@498 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2021-04-13 16:54:58 +00:00
contact
d36068af4e Store last internal msg ID in DB when detaching
References: https://todo.sr.ht/~emersion/soju/98

git-svn-id: file:///srv/svn/repo/suika/trunk@497 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2021-04-13 16:15:30 +00:00
contact
562beca198 Skip backlog logic in downstreamConn.welcome on chathistory
git-svn-id: file:///srv/svn/repo/suika/trunk@496 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2021-04-13 15:50:03 +00:00
contact
e32cf2acd9 Take msg ID in sendTargetBacklog
git-svn-id: file:///srv/svn/repo/suika/trunk@495 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2021-04-13 15:49:37 +00:00
contact
fec819c48a Panic on unknown user event type
This should never happen. Complain loudly if it does.

git-svn-id: file:///srv/svn/repo/suika/trunk@494 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2021-04-13 11:08:48 +00:00
contact
63c2238407 Introduce per-user logger
Adds the username to log lines.

git-svn-id: file:///srv/svn/repo/suika/trunk@493 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2021-04-13 11:04:23 +00:00
hubert
1cd4279256 Make casemapping work over bytes instead of runes
Fixes a panic in partialCasemap when the input string was invalid UTF-8.

git-svn-id: file:///srv/svn/repo/suika/trunk@492 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2021-04-13 10:48:46 +00:00
contact
04d4691eda cmd/soju: allow specifying -listen multiple times
Closes: https://todo.sr.ht/~emersion/soju/67

git-svn-id: file:///srv/svn/repo/suika/trunk@491 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2021-03-31 17:02:40 +00:00
contact
de665fc884 Update dependencies
git-svn-id: file:///srv/svn/repo/suika/trunk@490 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2021-03-31 16:18:16 +00:00
contact
83a6c849fd Save delivery receipts in DB
This avoids loosing history on restart for clients that don't
support chathistory.

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

git-svn-id: file:///srv/svn/repo/suika/trunk@489 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2021-03-31 16:04:13 +00:00
contact
00fbbb9d0d Use BARE for internal message IDs
This allows to have shorter and more future-proof IDs. This also
guarantees the IDs will only use reasonable ASCII characters (no
spaces), removing the need to encode them for PING/PONG tokens.

git-svn-id: file:///srv/svn/repo/suika/trunk@488 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2021-03-31 15:57:24 +00:00
contact
862be4f5b8 Rename user.clients to clientNames
This doesn't contain anything other than just the names. Make this
clearer.

git-svn-id: file:///srv/svn/repo/suika/trunk@487 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2021-03-30 10:44:56 +00:00
contact
180e314a01 Make NickServ detection casemapping-aware
git-svn-id: file:///srv/svn/repo/suika/trunk@486 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2021-03-30 10:28:45 +00:00
contact
e94da85df6 Introduce deliveredStore
This hides the double-map complexity behind a dedicated type.

git-svn-id: file:///srv/svn/repo/suika/trunk@485 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2021-03-29 15:49:50 +00:00
contact
10a2f92f68 Ensure targets are case-mapped before being passed to messageStore
messageStore isn't aware of the network's case-mapping. We need
to canonicalize the names before passing them to messageStore.

git-svn-id: file:///srv/svn/repo/suika/trunk@484 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2021-03-29 15:07:39 +00:00
contact
84b3a5d057 Move network.clients to user
No need to have this list per-network.

git-svn-id: file:///srv/svn/repo/suika/trunk@483 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2021-03-29 14:58:56 +00:00
contact
a313a3aead Simplify network.offlineClients
Replace it with a list of all clients (online or offline).

git-svn-id: file:///srv/svn/repo/suika/trunk@482 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2021-03-29 14:55:57 +00:00
contact
3f98447c8f contrib/casemap-logs.sh: new utility script
Previous soju versions were storing log without converting the channel
and nick names to their canonical lower-case representation. This could
result in two log directories for the same channel/nick.

This script fixes old log dirs.

git-svn-id: file:///srv/svn/repo/suika/trunk@481 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2021-03-26 14:31:54 +00:00
contact
2cba08b50e Introduce deliveredClientMap
Adds more semantics to map[string]string. Simplifies the complicated
mapStringStringCasemapMap type.

git-svn-id: file:///srv/svn/repo/suika/trunk@480 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2021-03-26 10:21:14 +00:00
hubert
3cad542811 Fix CHATHISTORY target not being casemapped
git-svn-id: file:///srv/svn/repo/suika/trunk@479 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2021-03-26 09:39:52 +00:00