lykoss / lykos

Werewolf, the popular detective/social party game (a theme of Mafia)
https://werewolf.chat
Other
127 stars 62 forks source link

Call update_account_info on every command #418

Closed skizzerz closed 4 years ago

skizzerz commented 4 years ago

This will make accounts much more reliable on ircds without account-notify, at the expense of a bit of lag time whenever account data is stale for a user. We cache the result for 15 minutes so that it is not too disruptive, however we can look into further tweaking things (such as by not firing it on role commands, due to the usually time-sensitive nature of them) should this work out to be problematic during gameplay.

Additionally, the proper import order of src files is now fully fixed in src/init.py so that we have a reference point for what is and is not safe to import while we are developing things. db.py was moved into a new db package to avoid the potential issue of having both a directory and a file named "db" as part of this.

Finally, the account_change event is properly fired if the user's account changes in ircds that do not support account-notify but which do support WHOX.