mirror of
https://github.com/42wim/matterbridge.git
synced 2025-02-19 11:59:02 -08:00
Tweak logging for marking users active
This commit is contained in:
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…
Reference in New Issue
Block a user