]> jfr.im git - irc/evilnet/x3.git/blobdiff - src/nickserv.c
Added merging SSL fingerprint lists during account merging
[irc/evilnet/x3.git] / src / nickserv.c
index 223ed57861faf6ebb1f58c8d803c96fbb9e9d122..01c6325c203af1ccc1e15aa3bddec0d1ca5be7e7 100644 (file)
@@ -4108,6 +4108,16 @@ static NICKSERV_FUNC(cmd_merge)
             string_list_append(hi_to->masks, strdup(mask));
     }
 
+    /* Merge the SSL fingerprints. */
+    for (ii=0; ii<hi_from->sslfps->used; ii++) {
+        char *sslfp = hi_from->sslfps->list[ii];
+        for (jj=0; jj<hi_to->sslfps->used; jj++)
+            if (!irccasecmp(hi_to->sslfps->list[jj], sslfp))
+                break;
+        if (jj==hi_to->sslfps->used) /* Nothing from the "to" handle covered this sslfp, so add it. */
+            string_list_append(hi_to->sslfps, strdup(sslfp));
+    }
+
     /* Merge the ignores. */
     for (ii=0; ii<hi_from->ignores->used; ii++) {
         char *ignore = hi_from->ignores->list[ii];