From a211ddfcdbbfd5feba9c464b0a29621f74684348 Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Sun, 17 Feb 2019 21:25:25 -0500 Subject: [PATCH] work around znc's broken nickserv support --- irc/idletimer.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/irc/idletimer.go b/irc/idletimer.go index e548d413..aa43a884 100644 --- a/irc/idletimer.go +++ b/irc/idletimer.go @@ -254,8 +254,12 @@ func (nt *NickTimer) Stop() { } func (nt *NickTimer) sendWarning() { - baseNotice := "Nickname is reserved; you must change it or authenticate to NickServ within %v" - nt.client.Notice(fmt.Sprintf(nt.client.t(baseNotice), nt.timeout)) + // ZNC's nickserv module will not detect this unless it is: + // 1. sent with prefix `nickserv` + // 2. contains the string "identify" + // 3. contains at least one of several other magic strings ("authenticate" works) + baseNotice := "Nickname is reserved; you must change it or authenticate (identify) to NickServ within %v" + nt.client.Send(nil, "NickServ", "NOTICE", nt.client.Nick(), fmt.Sprintf(nt.client.t(baseNotice), nt.timeout)) } func (nt *NickTimer) processTimeout() {