mirror of
https://github.com/SpudGunMan/meshing-around.git
synced 2026-03-28 17:32:36 +01:00
fix stale players
This commit is contained in:
@@ -248,6 +248,10 @@ I used ideas and snippets from other responder bots and want to call them out!
|
||||
- https://github.com/pdxlocations/meshtastic-Python-Examples
|
||||
- https://github.com/geoffwhittington/meshtastic-matrix-relay
|
||||
|
||||
GitHub user mrpatrick1991 For Docker configs, PiDiBi looking at test functions and other suggestions like wxc, CPU use, and alerting ideas
|
||||
Discord and Mesh user Cisien, and github Hailo1999, for testing and ideas!
|
||||
Games Ported from..
|
||||
- https://github.com/tigerpointe/Lemonade-Stand/
|
||||
- https://github.com/Reconfirefly/drugwars
|
||||
|
||||
GitHub user mrpatrick1991 For Docker configs, PiDiBi looking at test functions and other suggestions like wxc, CPU use, and alerting ideas
|
||||
Discord and Mesh user Cisien, and github Hailo1999, for testing and ideas! Lots of individuals on the Meshtastic discord who have tossed out ideas and tested code!
|
||||
|
||||
|
||||
@@ -497,6 +497,11 @@ def onReceive(packet, interface):
|
||||
game = "DopeWars"
|
||||
if llm_enabled:
|
||||
logger.debug(f"System: LLM Disabled for {message_from_id} for duration of game")
|
||||
|
||||
#if time exceeds 8 hours reset the player
|
||||
if dwPlayerTracker[i].get('last_played') < (time.time() - 28800):
|
||||
dwPlayerTracker.pop(i)
|
||||
|
||||
|
||||
for i in range(0, len(lemonadeTracker)):
|
||||
if lemonadeTracker[i].get('nodeID') == message_from_id:
|
||||
@@ -506,6 +511,10 @@ def onReceive(packet, interface):
|
||||
game = "LemonadeStand"
|
||||
if llm_enabled:
|
||||
logger.debug(f"System: LLM Disabled for {message_from_id} for duration of game")
|
||||
|
||||
#if time exceeds 8 hours reset the player
|
||||
if lemonadeTracker[i].get('time') < (time.time() - 28800):
|
||||
lemonadeTracker.pop(i)
|
||||
else:
|
||||
playingGame = False
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user