summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2016-06-05 14:43:34 +0100
committerRussell King <rmk+kernel@armlinux.org.uk>2019-07-21 20:59:35 +0100
commite9166ea294055c5cc510de2b05ed05056f05ed36 (patch)
tree82fbaa918b023e7eb7503dddc482ce8b6c21b7d7 /modules
parenta8305cde195225a2ca7b3384cb4c2d1290ed0867 (diff)
Add CERTFP capability
Avoid sending CERTFP commands to servers which do not support this by adding a CERTFP capability.
Diffstat (limited to 'modules')
-rw-r--r--modules/core/m_server.c2
-rw-r--r--modules/m_certfp.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/modules/core/m_server.c b/modules/core/m_server.c
index 2e0ed8d..7cd9ae2 100644
--- a/modules/core/m_server.c
+++ b/modules/core/m_server.c
@@ -104,7 +104,7 @@ sendnick_TS(struct Client *client_p, struct Client *target_p)
target_p->servptr->name, target_p->info);
}
- if (!EmptyString(target_p->certfp))
+ if (!EmptyString(target_p->certfp) && IsCapable(client_p, CAP_CERTFP))
sendto_one(client_p, ":%s CERTFP %s",
ID_or_name(target_p, client_p), target_p->certfp);
diff --git a/modules/m_certfp.c b/modules/m_certfp.c
index e52f9f5..359a651 100644
--- a/modules/m_certfp.c
+++ b/modules/m_certfp.c
@@ -58,9 +58,9 @@ ms_certfp(struct Client *client_p, struct Client *source_p,
MyFree(source_p->certfp);
source_p->certfp = strdup(parv[1]);
- sendto_server(client_p, CAP_TS6, NOCAPS, ":%s CERTFP %s",
+ sendto_server(client_p, CAP_TS6 | CAP_CERTFP, NOCAPS, ":%s CERTFP %s",
ID(source_p), parv[1]);
- sendto_server(client_p, NOCAPS, CAP_TS6, ":%s CERTFP %s",
+ sendto_server(client_p, CAP_CERTFP, CAP_TS6, ":%s CERTFP %s",
source_p->name, parv[1]);
return 0;
}