Blockheads-Messagebot / MessageBot

Automatically respond to events in chat on your server!
GNU General Public License v3.0
6 stars 3 forks source link

Players entries are not updated properly from logs #56

Closed Bibliofile closed 6 years ago

Bibliofile commented 6 years ago

When you launch the bot it should fetch the world logs and update it's player record according to joins that have happened since you last updated the bot. There are currently 2 problems.

  1. The logs aren't fetched.
  2. If chat comes in before the logs do (almost always) the lastPlayersUpdate key will be updated prematurely, resulting in log joins being ignored.

This should probably be fixed by moving the lastUpdate variable in _updatePlayers to a property that is initialized when the World class is created.