diff options
author | Davide Beatrici <git@davidebeatrici.dev> | 2020-03-26 06:57:20 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-26 06:57:20 +0300 |
commit | a6dc45193af2512a7d51919708ad27e2c4f81236 (patch) | |
tree | 9356462f9e615db3b4177762cca42eccecf6a32c | |
parent | bbb589fb37cc21819834820c7b54665937203d26 (diff) | |
parent | 6cddec04b580c3e723300ac2361cdf44570cd0f3 (diff) |
Merge PR #53: 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. |