- sendto_server(NULL, NULL, CAP_TS6|CAP_ENCAP, NOCAPS, ":%s ENCAP * SASL %s * S %s", me.id,
- source_p->id, parv[1]);
+ {
+ sendto_one(saslserv_p, ":%s ENCAP %s SASL %s %s H %s %s",
+ me.id, saslserv_p->servptr->name, source_p->id, saslserv_p->id,
+ source_p->host, source_p->sockhost);
+
+ if (source_p->certfp != NULL)
+ sendto_one(saslserv_p, ":%s ENCAP %s SASL %s %s S %s %s",
+ me.id, saslserv_p->servptr->name, source_p->id, saslserv_p->id,
+ parv[1], source_p->certfp);
+ else
+ sendto_one(saslserv_p, ":%s ENCAP %s SASL %s %s S %s",
+ me.id, saslserv_p->servptr->name, source_p->id, saslserv_p->id,
+ parv[1]);
+
+ rb_strlcpy(source_p->localClient->sasl_agent, saslserv_p->id, IDLEN);
+ }