hybridbot/README.md

42 lines
1.2 KiB
Markdown
Raw Permalink Normal View History

2016-07-25 18:01:51 +00:00
# hybridbot
2017-06-04 12:32:26 +00:00
Hybridbot is a bot that relays messages from a IRC channel to an XMPP MUC and vice versa. First of all, you need to install slixmpp and irc.
2016-07-25 18:01:51 +00:00
2017-06-04 12:32:26 +00:00
su -c "pip3 install slixmpp irc"
2016-07-25 18:01:51 +00:00
# or
2017-06-04 12:32:26 +00:00
su -c "pip3 install -r requirements.txt"
2016-07-25 18:01:51 +00:00
It's configuration is simple, you have to create a config file per relay, as this example (remember to change the values):
2016-08-01 19:17:05 +00:00
[Shared]
prefix = .
owner = somebody
2016-07-25 18:01:51 +00:00
[IRC]
channel = #daemons
nick = pasarela
2016-08-01 19:17:05 +00:00
server = chat.freenode.net
2016-07-25 18:01:51 +00:00
port = 6667
[XMPP]
jid = becario@daemons.cf
password = goodpassword
muc = testeando@salas.daemons.cf
nick = pasarela
2016-08-01 19:17:05 +00:00
Most of it is pretty obvious, the only two lines that need explanation are the ones in Shared.
2016-08-01 19:17:05 +00:00
The option "prefix" is a string that gets prefixed before the command like "!help" if prefix=!.
2016-08-01 19:17:05 +00:00
The option "owner" is a string that will be printed when issuing the ".help" command. It can be just something like "drymer on XMPP MUC" or just a name, your choice.
2016-07-25 18:01:51 +00:00
To execute it, just do:
2017-06-04 12:32:26 +00:00
python3 hybridbot.py myconfig.ini
2016-07-25 18:01:51 +00:00
Or if the config file is named "config.ini", just do:
2017-06-04 12:32:26 +00:00
python3 hybridbot.py
2016-08-01 19:17:05 +00:00
And on the MUC or the IRC channel, you can issue two commands, ".help" and ".users".