3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-12-22 18:52:41 +01:00

work around znc's broken nickserv support

This commit is contained in:
Shivaram Lingamneni 2019-02-17 21:25:25 -05:00
parent 09909e3b3d
commit a211ddfcdb

View File

@ -254,8 +254,12 @@ func (nt *NickTimer) Stop() {
} }
func (nt *NickTimer) sendWarning() { func (nt *NickTimer) sendWarning() {
baseNotice := "Nickname is reserved; you must change it or authenticate to NickServ within %v" // ZNC's nickserv module will not detect this unless it is:
nt.client.Notice(fmt.Sprintf(nt.client.t(baseNotice), nt.timeout)) // 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() { func (nt *NickTimer) processTimeout() {