Commit Graph

601 Commits

Author SHA1 Message Date
Simon Ser
7127fa325a
Add names to consumers 2020-02-07 17:35:57 +01:00
Simon Ser
fad9d820c1
Add an in-memory ring buffer
References: https://todo.sr.ht/~emersion/jounce/2
2020-02-07 16:43:54 +01:00
Simon Ser
69a35069ef
Handle downstream PART messages 2020-02-07 13:36:32 +01:00
Simon Ser
09a793ff9c
Handle downstream JOIN messages 2020-02-07 13:31:09 +01:00
Simon Ser
2e5395f20b
Send fake RPL_CREATED message 2020-02-07 13:23:09 +01:00
Simon Ser
4de405d3b2
Handle downstream MODE messages 2020-02-07 13:08:27 +01:00
Simon Ser
519cdd9e38
Close connection from writer goroutine
Connections were being closed from the reader goroutine, causing issues
when sending messages and immediately closing the connection.
2020-02-07 12:42:24 +01:00
Simon Ser
e17c0b3aca
Add upstreamConn.register 2020-02-07 12:37:44 +01:00
Simon Ser
96653499dc
Add parseMessageParams helper 2020-02-07 12:36:02 +01:00
Simon Ser
6d03af8243
Allow changing nickname 2020-02-07 12:19:42 +01:00
Simon Ser
50fc19c92f
Skip unregistered and closed upstream connections 2020-02-07 12:02:19 +01:00
Simon Ser
636ede13da
Add user.forEachDownstream 2020-02-07 11:56:36 +01:00
Simon Ser
059a799d16
Add user.forEachUpstream 2020-02-07 11:46:44 +01:00
Simon Ser
3586ca3d26
Add Server.getUser 2020-02-07 11:39:56 +01:00
Simon Ser
3b2bb58c60
Per-user connections 2020-02-07 11:36:42 +01:00
Simon Ser
7abf426447
Forward PRIVMSG messages 2020-02-07 11:07:01 +01:00
Simon Ser
0706d45aba
Handle channel mode changes 2020-02-07 11:01:53 +01:00
Simon Ser
bd54c57d71
Handle third-party JOIN and PART messages 2020-02-07 10:54:03 +01:00
Simon Ser
8493f5b255
Use a dedicated goroutine to write upstream messages 2020-02-06 22:46:46 +01:00
Simon Ser
774872d655
Add missing bridge.go, oops 2020-02-06 22:45:54 +01:00
Simon Ser
86f66cf6c4
Remove downstreamConn.WriteMessage
It wasn't clear what this function was doing
2020-02-06 22:35:24 +01:00
Simon Ser
ec658e3d39
Send channel info to downstream on registration 2020-02-06 22:29:24 +01:00
Simon Ser
3b0639bacc
Keep track of upstream connections in a list 2020-02-06 22:25:32 +01:00
Simon Ser
89f1944d30
De-duplicate downstream QUIT handling 2020-02-06 22:22:14 +01:00
Simon Ser
cd7556264e
Forward channel information 2020-02-06 22:19:31 +01:00
Simon Ser
4a816e1593
Write to downstream conn in dedicated goroutine 2020-02-06 21:52:04 +01:00
Simon Ser
3f2e08b949
Mark channel info as complete on RPL_ENDOFNAMES 2020-02-06 21:43:22 +01:00
Simon Ser
5988d10a0b
Remove downstream conn from list on disconnect 2020-02-06 21:30:44 +01:00
Simon Ser
36c404c50c
Allow Server to have access to upstreamConn 2020-02-06 21:20:22 +01:00
Simon Ser
8bbba42aef
Maintain a list of downstream connections 2020-02-06 21:11:35 +01:00
Simon Ser
726d7cb54b
Add per-upstream logger 2020-02-06 20:26:03 +01:00
Simon Ser
7876ddb9c8
Split IRC helpers to separate file 2020-02-06 19:24:32 +01:00
Simon Ser
ae7f162883
Join channels on upstream servers 2020-02-06 19:22:04 +01:00
Simon Ser
836a9c6986
Handle NOTICE from upstream servers 2020-02-06 18:10:13 +01:00
Simon Ser
343d4cfded
Handle MODE messages from upstream servers 2020-02-06 18:07:35 +01:00
Simon Ser
f2b471259a
Handle upstream RPL_MYINFO messages 2020-02-06 17:04:49 +01:00
Simon Ser
cad64e1a6c
Send standard user/channel modes to downstream connections 2020-02-06 16:50:47 +01:00
Simon Ser
9a331b9d38
Ignore some upstream messages 2020-02-06 16:39:09 +01:00
Simon Ser
b5f3bad588
Split downstram and upstream code into separate files 2020-02-06 16:18:19 +01:00
Simon Ser
a2d9a64bed
Log upstream server errors 2020-02-06 16:13:29 +01:00
Simon Ser
c14e26769f
Add basic upstream message handler 2020-02-06 16:11:28 +01:00
Simon Ser
56d793543e
Connect to upstream servers 2020-02-06 16:03:07 +01:00
Simon Ser
06cd1ce44f
Add Server.Logger 2020-02-06 15:50:46 +01:00
Simon Ser
003ce38bf8
Rename conn to downstreamConn 2020-02-06 15:22:26 +01:00
Simon Ser
3ccc1bb4e8
Handle PING 2020-02-06 12:18:37 +01:00
Simon Ser
f8a03a25df
Send ERR_NOMOTD on registration 2020-02-06 12:08:54 +01:00
Simon Ser
5547eb7290
Add connection registration 2020-02-04 18:56:07 +01:00
Simon Ser
23ca41b435
Handle NICK and USER 2020-02-04 12:19:18 +01:00
Simon Ser
6d4581a6d0
Send "unknown command" replies 2020-02-04 11:25:53 +01:00
Simon Ser
fb0825a100
Add LICENSE and README.md 2020-02-04 10:50:28 +01:00