Add pause until, store as unix second, to disable a user for a time
This commit is contained in:
@@ -47,7 +47,7 @@ type Client struct {
|
||||
IDs struct {
|
||||
Matrix string
|
||||
}
|
||||
PauseUntil time.Time
|
||||
PauseUntil Time
|
||||
}
|
||||
|
||||
var live Config
|
||||
@@ -64,7 +64,7 @@ func Clients() map[string]Client {
|
||||
clients := Get().Clients
|
||||
result := map[string]Client{}
|
||||
for k := range clients {
|
||||
if clients[k].PauseUntil.IsZero() || time.Now().After(clients[k].PauseUntil) {
|
||||
if clients[k].PauseUntil.Get().IsZero() || time.Now().After(clients[k].PauseUntil.Get()) {
|
||||
result[k] = clients[k]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user