XMPP Bot to provide version/uptime/ contact information
Find a file
nico 0c313565f2
simplification and major rework
* updated gitignore file
* partly reworked servercontact implementation
* complete rework of uptime, version
* part rework of xep requests
+ added more comments to xep requests
+ added opt_arg to version, xep and contact
* complete rework of validate function
* updated HandleError function
* part rework of StaticStrings function
+ implemented data dictionary to hold all data in main bot
+ added message_ids
* complete rework of queue building and deduplication
2018-11-06 23:43:11 +01:00
classes simplification and major rework 2018-11-06 23:43:11 +01:00
common simplification and major rework 2018-11-06 23:43:11 +01:00
.gitignore simplification and major rework 2018-11-06 23:43:11 +01:00
LICENCE.md Licence stuff 2018-10-02 01:44:53 +02:00
magicbot.service.dummy refactorization (#1) 2018-10-01 23:17:09 +02:00
main.py simplification and major rework 2018-11-06 23:43:11 +01:00
README.MD readme + usability improvements 2018-10-04 00:46:57 +02:00
requirements.txt readme + usability improvements 2018-10-04 00:46:57 +02:00

Python XMPP Chatbot

beforehand

Do not operate this bot on foreign servers. Many servers prohibit the usage of bots on their service.

functions

  • query xmpp server software and version XEP-0092
  • query xmpp server uptime XEP-0012
  • query xmpp server contact addresses XEP-0157
  • display information about XEP from the XSF extensions website
  • display help output
  • respond to username being mentioned

install

virtualenv

With virtualenv it is possible to run the bot inside a virtual environment without disrupting other python processes and or dependencies. This repo comes with a requirements.txt to make the install process as easy as possible.

cd to_the_path/of_the_bot/
mkdir ./venv

# create the virtual environment
virtualenv -p $(which python3) ./venv
source ./venv/bin/activate
pip3 install -r requirements.txt

configuration

Replace the dummy bot.cfg file, filled with correct credentials/ parameters.

[Account]
jid=nick@domain.tld/querybot
password=super_secret_password
[MUC]
rooms=room_to_connect_to@conference.domain.tld,another_room@conference.domain.tld
nick=mucnickname
systemd

Copy the systemd dummy file into systemd service folder. systemdctl daemon-reload and systemctl start magicbot.service to start the bot. If it is neccecary to start the bot automatically when the system boots do systemctl enable magicbot.service.

starting the bot without systemd

Got to the bots directory and run ./main.py &.