forked from External/ergo
disallow TAKE and REQUEST while under a FORBID
This commit is contained in:
parent
e1f56aaee3
commit
5426c9fdc0
3 changed files with 13 additions and 1 deletions
|
|
@ -216,6 +216,8 @@ func hsRequestHandler(server *Server, client *Client, command string, params []s
|
|||
if err != nil {
|
||||
if throttled, ok := err.(*vhostThrottleExceeded); ok {
|
||||
hsNotice(rb, fmt.Sprintf(client.t("You must wait an additional %v before making another request"), throttled.timeRemaining))
|
||||
} else if err == errVhostsForbidden {
|
||||
hsNotice(rb, client.t("An administrator has denied you the ability to use vhosts"))
|
||||
} else {
|
||||
hsNotice(rb, client.t("An error occurred"))
|
||||
}
|
||||
|
|
@ -408,6 +410,8 @@ func hsTakeHandler(server *Server, client *Client, command string, params []stri
|
|||
if err != nil {
|
||||
if throttled, ok := err.(*vhostThrottleExceeded); ok {
|
||||
hsNotice(rb, fmt.Sprintf(client.t("You must wait an additional %v before taking a vhost"), throttled.timeRemaining))
|
||||
} else if err == errVhostsForbidden {
|
||||
hsNotice(rb, client.t("An administrator has denied you the ability to use vhosts"))
|
||||
} else {
|
||||
hsNotice(rb, client.t("An error occurred"))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue