diff options
author | Ola Bini <ola@autonomia.digital> | 2020-03-25 22:54:32 +0300 |
---|---|---|
committer | Ola Bini <ola@autonomia.digital> | 2020-03-25 22:54:32 +0300 |
commit | 6cddec04b580c3e723300ac2361cdf44570cd0f3 (patch) | |
tree | 9356462f9e615db3b4177762cca42eccecf6a32c | |
parent | bbb589fb37cc21819834820c7b54665937203d26 (diff) |
Only send configuration updates if the channel exists
-rw-r--r-- | cmd/grumble/server.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/cmd/grumble/server.go b/cmd/grumble/server.go index 8dc0f21..64b4dd8 100644 --- a/cmd/grumble/server.go +++ b/cmd/grumble/server.go @@ -193,7 +193,10 @@ func (server *Server) SetSuperUserPassword(password string) { key := "SuperUserPassword" val := "sha1$" + salt + "$" + digest server.cfg.Set(key, val) - server.cfgUpdate <- &KeyValuePair{Key: key, Value: val} + + if server.cfgUpdate != nil { + server.cfgUpdate <- &KeyValuePair{Key: key, Value: val} + } } // CheckSuperUserPassword checks whether password matches the set SuperUser password. |