mirror of https://github.com/calzoneman/sync.git
Merge pull request #648 from zeratul0/patch-1
Change fallback voteskip ratio to .5 from 0
This commit is contained in:
commit
d8b9e3dab6
|
@ -114,10 +114,17 @@ OptionsModule.prototype.handleSetOptions = function (user, data) {
|
|||
if ("voteskip_ratio" in data) {
|
||||
var ratio = parseFloat(data.voteskip_ratio);
|
||||
if (isNaN(ratio) || ratio < 0) {
|
||||
ratio = 0;
|
||||
user.socket.emit("validationError", {
|
||||
target: "#cs-voteskip_ratio",
|
||||
message: `Input must be a number 0 or greater, not "${data.voteskip_ratio}"`
|
||||
});
|
||||
} else {
|
||||
this.opts.voteskip_ratio = ratio;
|
||||
sendUpdate = true;
|
||||
user.socket.emit("validationPassed", {
|
||||
target: "#cs-voteskip_ratio"
|
||||
});
|
||||
}
|
||||
this.opts.voteskip_ratio = ratio;
|
||||
sendUpdate = true;
|
||||
}
|
||||
|
||||
if ("afk_timeout" in data) {
|
||||
|
|
Loading…
Reference in New Issue