Stable will be released soon and your bots will auto-update to it if you wish to wait.
However if you dont then you can follow the steps below, but be sure to switch back to stable later on once api fully releases to stable branch.
HUZZAH! It is finally here! I have updated the Github repo and released the bot to the testing branch (for now).
Here is the changelog..
Bug fixes and a major change (support for Alloc's web API)
Buckle up this is a long one.
Added support for Alloc's web API so the bot can stop using telnet to send commands. It still listens to telnet as that is easier than trying to monitor server traffic via the API.
Added a command to switch between using telnet and the API. As much as possible the bot can use the same code for both. A new sendCommand function was added to handle sending telnet commands or API commands so that existing code would still work either way.
Added a new webAPI_functions code file that contains all of the new API functions.
Fixed a bug in the ban command that messed up if you added a reason for the ban.
Changed the permissions levels of some commands to make them more restrictive.
Added new default watch player timer and a command /set watch timer, to manage it. You can change how long the bot will report new player inventory and other info in-game. The default is 3 days.
Fixed command clash that prevented locations having protection set.
New command /use telnet, and /use api. Switches the bot between sending commands to telnet or the API. Note that the latest Alloc's mod is required for the API since it uses a new API command, getPlayerInventories.
Changed where and how the bot tracks server uptime. Now it gets that info from the mem command output. When the server is idle, the bot sends the mem command on a timer so that it knows when to reboot the server.
New command /set archive players day {number} (days). The default is 60 days. Also the player archiver had a small bug which is fixed and your bot will automatically archive player records of players that haven't joined in 2 months. You can change that with this command or disable the feature by setting this to 0.
New command /set web panel port {port number}. The webmap and the API are 2 ports above this port but the bot has no way to discover it on its own hence the need for this command. To use the web API you will need to tell the bot this port first.
To help reduce telnet spam from the bot to near zero, you can now set HideCommandExecutionLog to 1 in the server config. Previously the bot would complain if this wasn't 0. Setting it higher than 1 will interfere with the bot's ability to monitor server activity.
The /pack and /revive commands will now send you to the precise coordinates where you died if the bot can't find somewhere nearby to send you.
Some bot command spam is no longer necessary and has been removed. The bot uses other methods to gain the info that those commands provided.
Added a new custom_functions.lua file which contains functions that are called in several places elsewhere in the bot. The bot will never overwrite this file once it exists and you can put your own custom code in there. It contains info to help you understand its use. If a custom function returns true, the bot will stop processing its own code that follows the call. This allows you to override my code. Knock yourself out xD If I am hosting your bot, I can also host your custom code.
IRC command help is being added and will appear on IRC and on the botman.nz website soon. I am adding help for what feels like hundreds of commands, but is probably hundreds of commands.
New IRC command list prefabs {optional search text}. You can view a list of all prefabs known to the server or just specific ones such as cabin. You do not have to give it the complete prefab name. It will return all prefabs that contain your search string.
Bot command spam when the bot joins the server has been spread out to 1 command every 5 seconds. These commands are gg, version, admin list, ban list. The same has been done in other parts of the bot so consequently some commands such as /reload bot, take a little longer to do their thing (about 30 seconds).
Some commands that were called per player (via telnet) are now called once and include everyone (via the API). Doing this reduces the number of commands sent a lot but doing this for inventory could cause new problems. I have yet to find out what reading 30+ player inventories at once does to server performance since the API has to produce the file. On the plus side it only needs to do so every 30 seconds. Previously they were done individually and paced out over 30 seconds.
There is an issue with running Mudlet on Linux in that it loves to fill an error log called .xsession-errors with crap, not even errors. This causes problems when it eventually grows to fill the entire free space of the drive. I have added an OS call to nuke the log file hourly.
The bot will de-spawn hostiles in safe zones every 10 seconds when using the API. In telnet that is still done every minute as it uses the LE console command which doesn't just list hostiles, and I don't want to create server lag if at all possible.
I fixed a recent bug with the bot's calculation of server uptime. It should also be better at getting the number of players online right. That caused a few issues.
The bot is much better at detecting when it falls off the server and should not stay disconnected more than a few minutes, assuming nothing else is wrong to cause it to stay offline. Please report issues with this, as being connected to the server all the time is the general idea.
Fixed a reported issue with new players not being moved to the lobby. Well I think I've fixed it. Please report if this is not so.
Removed or changed some PvP commentaries to be more family friendly (but do they know what Timmy says during his Counter Strike sessions?)
Overall I have found working with the API output is much cleaner than dealing with telnet since each command's output is only that command's output. Mudlet has some nice features such as encoding and decoding JSON data and saving the output of the API calls to named text files which made the conversion to supporting the API so much easier.
Sabado, Agosto 25, 2018