From 5a3edf476949d63285e578cb6d41eeed8082d117 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Fri, 28 May 2021 09:59:51 +0200 Subject: [PATCH] Fix WHOIS DB not using case-mapping fallback In case the server advertises an unsupported case-mapping, we have a fallback. --- lib/client.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/client.js b/lib/client.js index ffe6dfe..41eb476 100644 --- a/lib/client.js +++ b/lib/client.js @@ -436,11 +436,12 @@ export default class Client extends EventTarget { setCaseMapping(name) { this.cm = irc.CaseMapping.byName(name); - this.whoisDB = new irc.CaseMapMap(this.whoisDB, this.cm); if (!this.cm) { console.error("Unsupported case-mapping '" + name + "', falling back to RFC 1459"); this.cm = irc.CaseMapping.RFC1459; } + + this.whoisDB = new irc.CaseMapMap(this.whoisDB, this.cm); } isMyNick(nick) {