|
@@ -80,6 +80,7 @@ type Client struct {
|
80
|
80
|
hostname string
|
81
|
81
|
invitedTo map[string]channelInvite
|
82
|
82
|
isSTSOnly bool
|
|
83
|
+ isKlined bool // #1941: k-line kills are special-cased to suppress some triggered notices/events
|
83
|
84
|
languages []string
|
84
|
85
|
lastActive time.Time // last time they sent a command that wasn't PONG or similar
|
85
|
86
|
lastSeen map[string]time.Time // maps device ID (including "") to time of last received command
|
|
@@ -1181,6 +1182,7 @@ func (client *Client) destroy(session *Session) {
|
1181
|
1182
|
details := client.detailsNoMutex()
|
1182
|
1183
|
sessionRemoved := false
|
1183
|
1184
|
registered := client.registered
|
|
1185
|
+ isKlined := client.isKlined
|
1184
|
1186
|
// XXX a temporary (reattaching) client can be marked alwaysOn when it logs in,
|
1185
|
1187
|
// but then the session attaches to another client and we need to clean it up here
|
1186
|
1188
|
alwaysOn := registered && client.alwaysOn
|
|
@@ -1341,8 +1343,10 @@ func (client *Client) destroy(session *Session) {
|
1341
|
1343
|
}
|
1342
|
1344
|
|
1343
|
1345
|
if registered {
|
1344
|
|
- client.server.snomasks.Send(sno.LocalQuits, fmt.Sprintf(ircfmt.Unescape("%s$r exited the network"), details.nick))
|
1345
|
|
- client.server.logger.Info("quit", fmt.Sprintf("%s is no longer on the server", details.nick))
|
|
1346
|
+ if !isKlined {
|
|
1347
|
+ client.server.snomasks.Send(sno.LocalQuits, fmt.Sprintf(ircfmt.Unescape("%s$r exited the network"), details.nick))
|
|
1348
|
+ client.server.logger.Info("quit", fmt.Sprintf("%s is no longer on the server", details.nick))
|
|
1349
|
+ }
|
1346
|
1350
|
}
|
1347
|
1351
|
}
|
1348
|
1352
|
|