Make yggdrasilctl less case-sensitive

This commit is contained in:
Neil Alexander 2018-07-09 19:30:41 +01:00
parent 5cff8428c3
commit cff7ef026f
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
2 changed files with 9 additions and 9 deletions

View file

@ -309,7 +309,7 @@ func (a *admin) handleRequest(conn net.Conn) {
handlers:
for _, handler := range a.handlers {
// We've found the handler that matches the request
if recv["request"] == handler.name {
if strings.ToLower(recv["request"].(string)) == strings.ToLower(handler.name) {
// Check that we have all the required arguments
for _, arg := range handler.args {
// An argument in [square brackets] is optional and not required,