the python3 bot namespace.
BOTLIB - python3 bot library
bot <cmd> [key=value] [key==value]
BOTLIB is a solid, non hackable bot, that runs under systemd as a 24/7 background service and starts the bot after reboot, intended to be programmable in a static, only code, no popen, no imports and no reading modules from a directory.
BOTLIB is programmable, to program the bot you have to have the code available as employing your own code requires that you install your own bot as the system bot. This is to not have a directory to read modules from to add commands to the bot but include the own programmed modules directly into the python code, so only trusted code (your own written code) is included and runnable. Reading random code from a directory is what gets avoided. As experience tells os.popen and __import__, importlib are avoided.
BOTLIB stores it’s data on disk where objects are time versioned and the last version saved on disk is served to the user layer. Files are JSON dumps that are read-only so thus should provide (disk) persistence more chance. Paths carry the type in the path name what makes reconstruction from filename easier then reading type from the object.
Only include your own written code should be the path to “secure”.
pip3 install botlib
configuration is done by calling the config command of the bot.
$ sudo cp /usr/local/share/botd/botd.service /etc/systemd/system$ sudo systemctl enable botd --now
use botctl instead of the use bot program$ sudo botctl cfg server=<server> channel=<channel> nick=<nick>$ sudo bptctl pwd <nickservnick> <nickservpass>$ sudo botctl cfg password=<outputfrompwd>$ sudo botctl cfg users=True$ sudo botctl met <userhost>
run the bot with the bot command, it will start a shell with the irc bot. use the -c option if you just want the console.
the bot has the following commands.
here is a short description of the commands.
git clone https://github.com/bthate/botlib
from bot.hdl import Commands def hlo(event): event.reply("hello!") Commands.add(hlo)
BOTLIB is placed in the Public Domain. No Copyright, No License.
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.