This should provide slightly more accurate (and non-overflowing) logic.
Merge branch 'master' of https://github.com/maxmenten/snoxd-koserver