Tweak logging for marking users active

pull/1872/head
Kufat 2 years ago
parent 4737074374
commit 47219a7393

@ -287,7 +287,6 @@ func (b *Birc) handlePrivMsg(client *girc.Client, event girc.Event) {
b.Log.Debugf("<= Sending message from %s on %s to gateway", event.Params[0], b.Account)
if b.ActivityTimeout > 0 {
b.Log.Debugf("<= Updating last-active time for user %s", event.Source.Name)
b.markUserActive(event.Source.Name, channel, time.Now().Unix())
}
b.Remote <- rmsg

@ -501,6 +501,7 @@ func (b *Birc) cleanActiveMap() {
}
func (b *Birc) markUserActive(nick string, channel string, activeTime int64) {
b.Log.Debugf("<= Updating last-active time for user %s in channel %s to %d", nick, channel, activeTime)
b.activeUsersMutex.Lock()
defer b.activeUsersMutex.Unlock()
nickActivity, found := b.activeUsers[nick]

Loading…
Cancel
Save