I have released an important bugfix update to the a18 and a19 code branches and updated the
github repo (finally).
Here is the changelog..
Added SQLite database and moved the MySQL memory tables to it to reduce load on the main database engine mainly for hosted bots where one engine is responsible for many bots.
Changed the random number function so it uses the local bot's SQLite database instead of MySQL.
Added a random password generator function mainly for the bot to use with Alloc's web API when setting the web token.
Fixed issue with the /who command giving too much info to players it shouldn't. Sorry if you missed out.
Fixed bug in the location safezone command. You could not undo the safezone command due to me using true instead of false. Ooops.
Recoded the /gamble command (and its aliases). It should no longer give less tickets than asked for unless you don't have enough cash or doing so would exceed the maximum tickets (which is 100). It didn't ever charge for tickets not issued. Now it works a bit differently internally. It first collects all the tickets, then removes ones you already have and it uses that remaining pool to randomly select tickets for you. The old code was more of a dartboard approach, but dartboards aren't edible so I'm now using a cheeseboard.
Fixed a bug in the /track command and related commands. Mostly the bug and the fix happened before updating github so there's nothing much to see of it here.
Players that are whitelisted in the bot's whitelist can now connect using a proxy without the bot banning them for that.
The botman config now has its own parser function. There is more work to be done with that but it means that the bot can now read and process it in telnet mode or API mode.
Telnet traffic displayed in Mudlet's own main window is now suppressed after a short time and only displays for about a minute on server and bot startup. There is an updated Bot profile with a button to toggle this feature should you need to see telnet traffic there.
A minor bugfix was done to the bot's slots system as it was getting out of sync with how many players were actually on the server versus the slots table and the bot was incorrectly telling players that the server was full when it wasn't.
The bot's Google translate feature has been disabled in the code. It may come back in the future.
The bot's afk (idle) kick timer is now configurable.
The bot will attempt to secure its IRC channels with a password if you set one. This also requires that you are using a modern version of Mudlet not the old modded version from 6 years ago. You really should upgrade (self-hosters). Hosted bots are all using the modern Mudlet already.
The bot can now detect when it has fallen off the IRC channels and will auto-rejoin them. This may require the modern Mudlet. I am not sure if this is fully supported by the old modded Mudlet.
Fixed (again) a bug that causes on rare occasions (usually) a player to get reset in the bot as if they were new again. The previous bugfix which is probably also new to this update helped but there were still some players getting reset. The bot now looks for them in a table called events that the bot fills with player joins, deaths and other events. If the bot finds their steam id in that table it does not reset them as new. If this still doesn't fix it I will need to hand in my [MAN] card.
The irc command 'show inventory' now has an exclude {player name} option. Currently it can only exclude 1 player but it is useful if you want to see what inventory happened in a base and exclude the base owner. Later I will make it possible to add lots of names so you can do this with shared bases.
Fixed a bug with loading player records into the bot's in-memory players table that was causing the number of records there to not always match the number of records in the database players table. This bug was partly responsible for resetting some players as new when they joined the server.
Added SQLite databases and code to manage them. SQLite is amazing! I wish I had figured out how to use it years earlier. I am using to to reduce load on the MySQL database. This means that each bot can do the bulk of its rapid and frequent database tasks without touching the main database engine which in turn means that bots will experience less lag and commands will respond much quicker.
The reconnect timer no longer sets web tokens. This was causing a slow infinite loop sometimes of setting web tokens.
New commands:
{/set player {steam id/name/entity id} name {new name}
Uses the botman console command bm-overridechatname or Stompy's bc-playername override console command if the Botman mod is missing. This changes the in-game player name in chat however there is currently a bug in the Botman mod where it works but only in private chat which isn't very useful.