Another idea I had was to internally track the requested capabilities, and also track for which we have received an ACK or NAK. We would only end capability negotiation once all capabilities have been sorted in either category. This fixes the need for having clients to specifically deny a request to continue, which is not very efficient to begin with.
As per http://ircv3.net/specs/core/capability-negotiation-3.1.html we should be able to send multiple capabilities in a single REQ command and receive ACK in a single command as well for all of the requested capabilities.
Another idea I had was to internally track the requested capabilities, and also track for which we have received an ACK or NAK. We would only end capability negotiation once all capabilities have been sorted in either category. This fixes the need for having clients to specifically deny a request to continue, which is not very efficient to begin with.