Made volume range check inclusive

This commit is contained in:
Matthieu Grieger 2016-06-25 12:50:08 -07:00 committed by GitHub
parent 95dbd75e19
commit 26098d7a88

View file

@ -55,7 +55,7 @@ func (c *VolumeCommand) Execute(user *gumble.User, args ...string) (string, bool
return "", true, errors.New(viper.GetString("commands.volume.messages.parsing_error"))
}
if newVolume < viper.GetFloat64("volume.lowest") || newVolume > viper.GetFloat64("volume.highest") {
if newVolume <= viper.GetFloat64("volume.lowest") || newVolume >= viper.GetFloat64("volume.highest") {
return "", true, fmt.Errorf(viper.GetString("commands.volume.messages.out_of_range_error"),
viper.GetFloat64("volume.lowest"), viper.GetFloat64("volume.highest"))
}