Add support for the extended-join capability
This simple implementation only advertises extended-join to downstreams when all upstreams support it. In the future, it could be modified so that soju buffers incoming upstream JOINs, sends a WHO, waits for the reply, and sends an extended join to the downstream; so that soju could advertise that capability even when some or all upstreams do not support it. This is not the case in this commit.
This commit is contained in:
parent
bbe67adf1e
commit
28cf1147e8
@ -76,6 +76,7 @@ var permanentDownstreamCaps = map[string]string{
|
||||
// require support from all upstreams to be enabled
|
||||
var needAllDownstreamCaps = map[string]string{
|
||||
"away-notify": "",
|
||||
"extended-join": "",
|
||||
"multi-prefix": "",
|
||||
}
|
||||
|
||||
@ -281,6 +282,9 @@ func (dc *downstreamConn) SendMessage(msg *irc.Message) {
|
||||
}
|
||||
}
|
||||
}
|
||||
if msg.Command == "JOIN" && !dc.caps["extended-join"] {
|
||||
msg.Params = msg.Params[:1]
|
||||
}
|
||||
|
||||
dc.conn.SendMessage(msg)
|
||||
}
|
||||
|
@ -26,6 +26,7 @@ import (
|
||||
var permanentUpstreamCaps = map[string]bool{
|
||||
"away-notify": true,
|
||||
"batch": true,
|
||||
"extended-join": true,
|
||||
"labeled-response": true,
|
||||
"message-tags": true,
|
||||
"multi-prefix": true,
|
||||
|
Loading…
Reference in New Issue
Block a user