code: async def on_raw_cap_ack(self, params):
          
          for capab in params[0].split():
              cp, value = self._capability_normalize(capab)
              self._capabilities_requested.discard(cp)
  
              # Determine capability type and callback.
              if capab.startswith(DISABLED_PREFIX):
                  self._capabilities[cp] = False
                  attr = 'on_capability_' + pydle.protocol.identifierify(cp) + '_disabled'
              elif capab.startswith(STICKY_PREFIX):
                  # Can't disable it. Do nothing.
                  self.logger.error('Could not disable capability %s.', cp)
                  continue
              else:
                  self._capabilities[cp] = value if value else True
                  attr = 'on_capability_' + pydle.protocol.identifierify(cp) + '_enabled'
  
              # Indicate we're gonna use this capability if needed.
              if capab.startswith(ACKNOWLEDGEMENT_REQUIRED_PREFIX):
                  await self.rawmsg('CAP', 'ACK', cp)
  
              # Run callback.
              if hasattr(self, attr):
                  status = await getattr(self, attr)()
              else:
                  status = NEGOTIATED
  
              # If the process needs more time, add it to the database and end later.
              if status == NEGOTIATING:
                  self._capabilities_negotiating.add(cp)
              elif status == FAILED:
                  # Ruh-roh, negotiation failed. Disable the capability.
                  self.logger.warning('Capability negotiation for %s failed. Attempting to disable capability again.', cp)
  
                  await self.rawmsg('CAP', 'REQ', '-' + cp)
                  self._capabilities_requested.add(cp)
  
          # If we have no capabilities left to process, end it.
          if not self._capabilities_requested and not self._capabilities_negotiating:
              await self.rawmsg('CAP', 'END')
docs: Update active capabilities: requested capability accepted.