Go to file
Alexei Sorokin c94ef4e3a1 Add [Shared] to config, with 'prefix' and 'owner' opts
'owner' is moved from [IRC] and [XMPP].
'prefix' controls what prefix commands have.
2016-08-01 21:12:35 +03:00
.gitignore initial commit 2016-07-25 20:01:51 +02:00
AUTHORS initial commit 2016-07-25 20:01:51 +02:00
example.ini Add [Shared] to config, with 'prefix' and 'owner' opts 2016-08-01 21:12:35 +03:00
hybridbot.py Add [Shared] to config, with 'prefix' and 'owner' opts 2016-08-01 21:12:35 +03:00
LICENSE initial commit 2016-07-25 20:01:51 +02:00
README.md Stupid format thing 2016-07-25 21:27:00 +02:00
requirements.txt Port to modern irc module 2016-07-30 17:47:11 +03:00

hybridbot

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 xmppy.

su -c "pip2 install xmppy"
# or
su -c "pip2 install -r requirements.txt"

It's configuration is simple, you have to create a config file per relay, as this example (remember to change the values):

[IRC]
channel  = #daemons
nick     = pasarela
server   = irc.freenode.net
port     = 6667
owner    = somebody

[XMPP]
jid      = becario@daemons.cf
password = goodpassword
muc      = testeando@salas.daemons.cf
nick     = pasarela
lines    = 20

Most of it is pretty obvious, the only two lines that need explanation are the last one of XMPP and the last one of IRC.

The variable "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.

Respect the variable "line", when joining a muc you receive the last 20 messages send, which would be relayed to the IRC channel. With this variable, the bot will ignore the default 20 lines. Change it if the XMPP server has non-standard messages retrieve.

To execute it, just do:

python2 hybridbot.py myconfig.ini

Or if the config file is named "config.ini", just do:

python2 hybridbot.py

And on the muc or the IRC channel, you can issue two commands, ".help" and ".users".