1
0
Fork 0
forked from External/ergo

persist last seen on shutdown

This commit is contained in:
Shivaram Lingamneni 2020-06-29 00:30:27 -04:00
parent a38d375bda
commit 0f04acaa40
2 changed files with 24 additions and 3 deletions

View file

@ -116,6 +116,9 @@ func (server *Server) Shutdown() {
//TODO(dan): Make sure we disallow new nicks
for _, client := range server.clients.AllClients() {
client.Notice("Server is shutting down")
if client.AlwaysOn() {
client.Store(IncludeLastSeen)
}
}
if err := server.store.Close(); err != nil {