review fix: add maxParams for service commands

This commit is contained in:
Shivaram Lingamneni 2019-01-04 10:03:12 -05:00
parent 4caa362f18
commit 598d9a025b
4 changed files with 86 additions and 13 deletions

View file

@ -7,7 +7,6 @@ import (
"errors"
"fmt"
"regexp"
"strings"
"time"
)
@ -125,6 +124,7 @@ for the rejection.`,
capabs: []string{"vhosts"},
enabled: hostservEnabled,
minParams: 1,
maxParams: 2,
},
}
)
@ -296,7 +296,7 @@ func hsRejectHandler(server *Server, client *Client, command string, params []st
var reason string
user := params[0]
if len(params) > 1 {
reason = strings.Join(params[1:], " ")
reason = params[1]
}
vhostInfo, err := server.accounts.VHostReject(user, reason)