mirror of
https://github.com/ergochat/ergo.git
synced 2025-01-03 08:32:43 +01:00
CAP: Correctly suspend registration for CAP REQ as per the spec
This commit is contained in:
parent
342a84ba3f
commit
713fc59691
@ -67,6 +67,10 @@ func capHandler(server *Server, client *Client, msg ircmsg.IrcMessage) bool {
|
|||||||
client.Send(nil, server.name, "CAP", client.nick, subCommand, client.capabilities.String(caps.Cap301, CapValues)) // values not sent on LIST so force 3.1
|
client.Send(nil, server.name, "CAP", client.nick, subCommand, client.capabilities.String(caps.Cap301, CapValues)) // values not sent on LIST so force 3.1
|
||||||
|
|
||||||
case "REQ":
|
case "REQ":
|
||||||
|
if !client.registered {
|
||||||
|
client.capState = CapNegotiating
|
||||||
|
}
|
||||||
|
|
||||||
// make sure all capabilities actually exist
|
// make sure all capabilities actually exist
|
||||||
for _, capability := range capabilities.List() {
|
for _, capability := range capabilities.List() {
|
||||||
if !SupportedCapabilities.Has(capability) {
|
if !SupportedCapabilities.Has(capability) {
|
||||||
|
Loading…
Reference in New Issue
Block a user