Rounded ontime

This commit is contained in:
Sven Heidemann 2021-12-21 18:43:00 +01:00
parent daa031bc57
commit b436daeb35

View File

@ -157,7 +157,7 @@ class Base(ModuleABC, OnMemberJoinABC, OnMemberRemoveABC, OnMessageABC, OnVoiceS
join.leaved_on = datetime.now()
# ontime as hours
ontime = (join.leaved_on - join.joined_on).total_seconds()/3600
ontime = round((join.leaved_on - join.joined_on).total_seconds()/3600, 2)
old_xp = user.xp
user.xp += round(ontime * server_st.xp_per_ontime_hour)