-
-static void
-advertise_sasl_cap(bool available)
-{
- if (sasl_agent_present != available) {
- if (available) {
- sendto_local_clients_with_capability(CLICAP_CAP_NOTIFY, ":%s CAP * NEW :sasl", me.name);
- } else {
- sendto_local_clients_with_capability(CLICAP_CAP_NOTIFY, ":%s CAP * DEL :sasl", me.name);
- }
- sasl_agent_present = available;
- }
-}
-
-static void
-advertise_sasl_new(struct Client *client_p)
-{
- if (!ConfigFileEntry.sasl_service)
- return;
-
- if (irccmp(client_p->name, ConfigFileEntry.sasl_service))
- return;
-
- advertise_sasl_cap(IsService(client_p));
-}
-
-static void
-advertise_sasl_exit(void *ignored)
-{
- if (!ConfigFileEntry.sasl_service)
- return;
-
- if (sasl_agent_present) {
- advertise_sasl_cap(sasl_visible(NULL));
- }
-}
-
-static void
-advertise_sasl_config(void *ignored)
-{
- advertise_sasl_cap(sasl_visible(NULL));
-}