Bot to manage a xmpp ejabberd node from your Akkoma instance, by posting keywords to it. The bot can register you, unregister you and show you the ejabberd node stats.
akkoma.py | ||
akkomabot.py | ||
ejabberdapi.py | ||
LICENSE | ||
README.md | ||
requirements.txt | ||
xmpp.py |
xmpp Akkoma bot
bot to manage an xmpp ejabberd node by posting keywords to it from your Akkoma account.
The bot only listen keywords from your Akkoma instance local users. They can register themselves to your xmpp server, unregister and also get your xmpp node stats.
The keywords that Akkoma instance local users can use are:
@your_bot register
@your_bot unregister
@your_bot stats
The bot will process the keyword thanks to the wrapper for ejabberd (included) and the wrapper for Akkoma (also included) but first time you run python xmpp.py
it will ask for the needed parameters like:
- api_base_url: http://127.0.0.1:5280
- local_vhost: your local ejabberd vhost
- admin_account: the ejabberd admin account, in exemple admin@ejabberd.server
- admin_pass: ejabberd admin account password
- Akkoma hostname: in ex. akkoma.host
Before running python xmpp.py
:
- git clone https://git.mastodont.cat/spla/xmpp.git target_dir.
cd target_dir
- create the Python Virtual Environment with
python3.x -m venv .
- activate it with
source bin/activate
- run
pip install -r requirements.txt
to install required libraries. - set up your contrab to run
python xmpp.py
every minute.
Enjoy!