24 Commits

Author SHA1 Message Date
contact
d4a0c5bd48 Add an ident server
Closes: https://todo.sr.ht/~emersion/soju/69

git-svn-id: file:///srv/svn/repo/suika/trunk@385 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2020-08-11 08:59:06 +00:00
contact
d000ec491a cmd/sojuctl: read user from DB before updating it
This makes sure we don't overwrite other fields, such as Admin.

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

git-svn-id: file:///srv/svn/repo/suika/trunk@380 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2020-08-11 08:21:49 +00:00
delthas
535e85051f sojuctl: Add support for creating admin users
This adds a new flag, `-admin` for creating admin users, which can
access admin service commands, among which create-user to create other
users on-the-fly.

Since the person running the commands in the README will be the local
soju administrator, the user they create should be admin as well, hence
the README update.

git-svn-id: file:///srv/svn/repo/suika/trunk@330 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2020-06-08 20:30:09 +00:00
delthas
7f49fa7971 Fix: Check the stdin scanner for errors when reading the password
Reading from stdin with Scanner.Scan() can either fail because of a read
error, or return no bytes because the EOF was reached.

This adds support for checking these cases before actually reading the
password.

git-svn-id: file:///srv/svn/repo/suika/trunk@326 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2020-06-08 20:30:09 +00:00
contact
7c4131cbdb Introduce User.Created
For Network and Channel, the database only needed to define one Store
operation to create/update a record. However since User is missing an ID
we couldn't have a single StoreUser function like other types. We had
CreateUser and UpdatePassword. As new User fields get added (e.g. the
upcoming Admin flag) this isn't sustainable.

We could have CreateUser and UpdateUser, but this wouldn't be consistent
with other types. Instead, introduce User.Created which indicates
whether the record is already stored in the DB. This can be used in a
new StoreUser function to decide whether we need to UPDATE or INSERT
without relying on SQL constraints and INSERT OR UPDATE.

The ListUsers and GetUser functions set User.Created to true.

git-svn-id: file:///srv/svn/repo/suika/trunk@324 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2020-06-08 09:59:03 +00:00
contact
f38af41317 Add support for WebSocket connections
WebSocket connections allow web-based clients to connect to IRC. This
commit implements the WebSocket sub-protocol as specified by the pending
IRCv3 proposal [1].

WebSocket listeners can now be set up via a "wss" protocol in the
`listen` directive. The new `http-origin` directive allows the CORS
allowed origins to be configured.

[1]: https://github.com/ircv3/ircv3-specifications/pull/342

git-svn-id: file:///srv/svn/repo/suika/trunk@323 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2020-06-07 12:13:46 +00:00
contact
adbb37b8d7 Allow multiple listeners, default to ircs
Users can now specify multiple "listen" directives in their
configuration file. If -listen is specified on the CLI, it's added to
the list of listeners.

Listeners are now parsed as URLs. If the scheme is missing "ircs" is
assumed. URLs allow to enable/disable TLS on a per-listener basis and
will be used for Unix sockets too.

The default listening address is changed from irc+insecure://:6667 to
ircs://:6697. This avoids setting up an insecure listener opened to
everybody.

git-svn-id: file:///srv/svn/repo/suika/trunk@317 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2020-06-04 18:16:23 +00:00
admin
1f83ec54b1 Allow to read password when stdin is not a tty.
git-svn-id: file:///srv/svn/repo/suika/trunk@308 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2020-06-03 13:51:56 +00:00
admin
88284aa7de Add ability to change password
git-svn-id: file:///srv/svn/repo/suika/trunk@251 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2020-04-10 08:09:02 +00:00
delthas
3ac0e6bd4d Add support for bouncer logs
Add bouncer logs, in a network/channel/date.log format, in a similar
manner to ZNC log module. PRIVMSG, JOIN, PART, QUIT, MODE are logged.

Add a config directive for the logs file, including a way to disable
them entirely.

git-svn-id: file:///srv/svn/repo/suika/trunk@178 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2020-03-27 23:07:20 +00:00
contact
1a9d6a58a0 Rename project to soju
git-svn-id: file:///srv/svn/repo/suika/trunk@98 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2020-03-13 17:13:03 +00:00
contact
79f3b73eab cmd/jouncectl: new command
Allows to create users.

git-svn-id: file:///srv/svn/repo/suika/trunk@84 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2020-03-11 18:01:03 +00:00
contact
18c962e5c0 Add SQLite database
Closes: https://todo.sr.ht/~emersion/jounce/9

git-svn-id: file:///srv/svn/repo/suika/trunk@77 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2020-03-04 17:22:58 +00:00
contact
b0ceb14bd4 cmd/jounce: fix non-TLS listener address
git-svn-id: file:///srv/svn/repo/suika/trunk@70 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2020-03-03 14:15:57 +00:00
contact
d9e356a580 Add a -debug flag
git-svn-id: file:///srv/svn/repo/suika/trunk@64 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2020-02-18 15:31:18 +00:00
contact
75a8a58a44 Add config file
git-svn-id: file:///srv/svn/repo/suika/trunk@62 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2020-02-18 13:10:23 +00:00
contact
c6c6b9476d Add CLI flags for listening address and hostname
git-svn-id: file:///srv/svn/repo/suika/trunk@61 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2020-02-17 15:25:09 +00:00
contact
08c05383eb Per-user connections
git-svn-id: file:///srv/svn/repo/suika/trunk@37 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2020-02-07 10:36:42 +00:00
contact
1ce61f3942 Join channels on upstream servers
git-svn-id: file:///srv/svn/repo/suika/trunk@19 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2020-02-06 18:22:04 +00:00
contact
2ff6caa14d Connect to upstream servers
git-svn-id: file:///srv/svn/repo/suika/trunk@10 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2020-02-06 15:03:07 +00:00
contact
b7d8b2a627 Add Server.Logger
git-svn-id: file:///srv/svn/repo/suika/trunk@9 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2020-02-06 14:50:46 +00:00
contact
15f3fba181 Add connection registration
git-svn-id: file:///srv/svn/repo/suika/trunk@5 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2020-02-04 17:56:07 +00:00
contact
18335e2279 Send "unknown command" replies
git-svn-id: file:///srv/svn/repo/suika/trunk@3 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2020-02-04 10:25:53 +00:00
contact
d7aeee7cc9 Add basic IRC listener
git-svn-id: file:///srv/svn/repo/suika/trunk@1 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2020-02-04 09:46:22 +00:00