mirror of
https://github.com/ergochat/ergo.git
synced 2026-01-09 20:02:07 -08:00
CAP: Correctly suspend registration for CAP REQ as per the spec
This commit is contained in:
parent
342a84ba3f
commit
713fc59691
1 changed files with 4 additions and 0 deletions
|
|
@ -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
|
||||
|
||||
case "REQ":
|
||||
if !client.registered {
|
||||
client.capState = CapNegotiating
|
||||
}
|
||||
|
||||
// make sure all capabilities actually exist
|
||||
for _, capability := range capabilities.List() {
|
||||
if !SupportedCapabilities.Has(capability) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue