Browse Source

CAP: Correctly suspend registration for CAP REQ as per the spec

tags/v0.11.0-alpha
Daniel Oaks 6 years ago
parent
commit
713fc59691
1 changed files with 4 additions and 0 deletions
  1. 4
    0
      irc/capability.go

+ 4
- 0
irc/capability.go View File

@@ -67,6 +67,10 @@ func capHandler(server *Server, client *Client, msg ircmsg.IrcMessage) bool {
67 67
 		client.Send(nil, server.name, "CAP", client.nick, subCommand, client.capabilities.String(caps.Cap301, CapValues)) // values not sent on LIST so force 3.1
68 68
 
69 69
 	case "REQ":
70
+		if !client.registered {
71
+			client.capState = CapNegotiating
72
+		}
73
+
70 74
 		// make sure all capabilities actually exist
71 75
 		for _, capability := range capabilities.List() {
72 76
 			if !SupportedCapabilities.Has(capability) {

Loading…
Cancel
Save