1
0
mirror of https://gitlab.com/Deukhoofd/DeukBot4.git synced 2025-09-02 23:57:19 +00:00

Fix issue where initial change of points could set below limit

This commit is contained in:
Deukhoofd 2019-01-29 16:06:17 +01:00
parent 7b4967f1ca
commit a393f2ca1e
No known key found for this signature in database
GPG Key ID: B4C087AC81641654

View File

@ -36,6 +36,8 @@ namespace DeukBot4.Database
var exists = db.HashGet("points", (RedisValue) key);
if (!exists.HasValue)
{
if (deltaPoints < -100)
deltaPoints = -100;
db.HashSet("points", (RedisValue) key, deltaPoints);
return deltaPoints;
}