SMS module: after reload, datas are not correctly typed

This commit is contained in:
nemunaire 2014-07-10 23:38:00 +02:00
parent 85edb9489d
commit 509e85f55a

View File

@ -55,7 +55,7 @@ def cmd_sms(msg):
for u in msg.cmds[1].split(","):
if u not in DATAS.index:
raise IRCException("Désolé, je sais pas comment envoyer de SMS à %s." % u)
elif cur_epoch - DATAS.index[u]["lastuse"] < 42:
elif cur_epoch - float(DATAS.index[u]["lastuse"]) < 42:
raise IRCException("Un peu de calme, %s a déjà reçu un SMS il n'y a pas si longtemps." % u)
# Go!