mirror of
https://github.com/ergochat/ergo.git
synced 2025-12-20 02:00:11 -08:00
fix #764
This commit is contained in:
parent
b1e5570f85
commit
e1f56aaee3
2 changed files with 26 additions and 7 deletions
|
|
@ -298,7 +298,7 @@ func hsSetHandler(server *Server, client *Client, command string, params []strin
|
|||
}
|
||||
// else: command == "del", vhost == ""
|
||||
|
||||
_, err := server.accounts.VHostSet(user, vhost, 0)
|
||||
_, err := server.accounts.VHostSet(user, vhost)
|
||||
if err != nil {
|
||||
hsNotice(rb, client.t("An error occurred"))
|
||||
} else if vhost != "" {
|
||||
|
|
@ -404,7 +404,7 @@ func hsTakeHandler(server *Server, client *Client, command string, params []stri
|
|||
return
|
||||
}
|
||||
|
||||
_, err := server.accounts.VHostSet(client.Account(), vhost, config.Accounts.VHosts.UserRequests.Cooldown)
|
||||
_, err := server.accounts.VHostTake(client.Account(), vhost, config.Accounts.VHosts.UserRequests.Cooldown)
|
||||
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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue