cookiemon / Keksbot

Well... Everyone needs an IRC-Bot, right? So here is mine.
Other
2 stars 0 forks source link

Mensa prevent integer overflow #14

Open pcworld opened 7 years ago

pcworld commented 7 years ago

if (day > 125*365.25) { print "you're going to be dead and eating dirt"; }

A similar case for day < -125*365.25 might be useful.

Sources: https://de.wikipedia.org/wiki/%C3%84ltester_Mensch + a little safety buffer

cookiemon commented 7 years ago

Not futureproof, what if life expectancy rises? Should at least be a configuration parameter, if not a web service.

ghost commented 6 years ago

added some code in PR #15