-DECLARE_MODULE_AV1(sasl, NULL, NULL, sasl_clist, NULL, sasl_hfnlist, "$Revision: 1409 $");
+static int
+sasl_visible(void)
+{
+ struct Client *agent_p = NULL;
+
+ if (ConfigFileEntry.sasl_service)
+ agent_p = find_named_client(ConfigFileEntry.sasl_service);
+
+ return agent_p != NULL && IsService(agent_p);
+}
+
+static struct ClientCapability capdata_sasl = {
+ .visible = sasl_visible,
+ .flags = CLICAP_FLAGS_STICKY,
+};
+
+static int
+_modinit(void)
+{
+ CLICAP_SASL = capability_put(cli_capindex, "sasl", &capdata_sasl);
+ return 0;
+}
+
+static void
+_moddeinit(void)
+{
+ capability_orphan(cli_capindex, "sasl");
+}
+
+DECLARE_MODULE_AV1(sasl, _modinit, _moddeinit, sasl_clist, NULL, sasl_hfnlist, "$Revision: 1409 $");