|
@@ -179,6 +179,7 @@ type NickTimer struct {
|
179
|
179
|
client *Client
|
180
|
180
|
|
181
|
181
|
// mutable
|
|
182
|
+ stopped bool
|
182
|
183
|
nick string
|
183
|
184
|
accountForNick string
|
184
|
185
|
account string
|
|
@@ -213,6 +214,11 @@ func (nt *NickTimer) Touch() {
|
213
|
214
|
func() {
|
214
|
215
|
nt.Lock()
|
215
|
216
|
defer nt.Unlock()
|
|
217
|
+
|
|
218
|
+ if nt.stopped {
|
|
219
|
+ return
|
|
220
|
+ }
|
|
221
|
+
|
216
|
222
|
// the timer will not reset as long as the squatter is targeting the same account
|
217
|
223
|
accountChanged := accountForNick != nt.accountForNick
|
218
|
224
|
// change state
|
|
@@ -248,6 +254,7 @@ func (nt *NickTimer) Stop() {
|
248
|
254
|
nt.timer.Stop()
|
249
|
255
|
nt.timer = nil
|
250
|
256
|
}
|
|
257
|
+ nt.stopped = true
|
251
|
258
|
}
|
252
|
259
|
|
253
|
260
|
func (nt *NickTimer) sendWarning() {
|