Este bot tiene historia
https://daemons.it/posts/hybridbot-bot-pasarela-irc-abber/
lib | ||
.gitignore | ||
AUTHORS | ||
hybridbot.py | ||
LICENSE | ||
README.md | ||
requirements.txt |
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
[XMPP]
jid = becario@daemons.cf
password = goodpassword
muc = testeando@salas.daemons.cf
nick = pasarela
lines = 20
Most of it is pretty obvious, the only line that needs explanation is the last one. When joining a muc, you receive the last 20 messages send, which would be relayed to the IRC channel. With the variable "line", 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