Update README.md
This commit is contained in:
parent
c94ef4e3a1
commit
3f2e2c3ff4
26
README.md
26
README.md
@ -1,39 +1,41 @@
|
|||||||
# hybridbot
|
# 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.
|
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 sleekxmpp and irc.
|
||||||
|
|
||||||
su -c "pip2 install xmppy"
|
su -c "pip install sleekxmpp irc"
|
||||||
# or
|
# or
|
||||||
su -c "pip2 install -r requirements.txt"
|
su -c "pip 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):
|
It's configuration is simple, you have to create a config file per relay, as this example (remember to change the values):
|
||||||
|
|
||||||
|
[Shared]
|
||||||
|
prefix = .
|
||||||
|
owner = somebody
|
||||||
|
|
||||||
[IRC]
|
[IRC]
|
||||||
channel = #daemons
|
channel = #daemons
|
||||||
nick = pasarela
|
nick = pasarela
|
||||||
server = irc.freenode.net
|
server = chat.freenode.net
|
||||||
port = 6667
|
port = 6667
|
||||||
owner = somebody
|
|
||||||
|
|
||||||
[XMPP]
|
[XMPP]
|
||||||
jid = becario@daemons.cf
|
jid = becario@daemons.cf
|
||||||
password = goodpassword
|
password = goodpassword
|
||||||
muc = testeando@salas.daemons.cf
|
muc = testeando@salas.daemons.cf
|
||||||
nick = pasarela
|
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.
|
Most of it is pretty obvious, the only two lines that need explanation are the ones in Shared.
|
||||||
|
|
||||||
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.
|
The option "prefix" is a string that gets prefixed before the command like "!help" if prefix=!.
|
||||||
|
|
||||||
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.
|
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.
|
||||||
|
|
||||||
To execute it, just do:
|
To execute it, just do:
|
||||||
|
|
||||||
python2 hybridbot.py myconfig.ini
|
python hybridbot.py myconfig.ini
|
||||||
|
|
||||||
Or if the config file is named "config.ini", just do:
|
Or if the config file is named "config.ini", just do:
|
||||||
|
|
||||||
python2 hybridbot.py
|
python hybridbot.py
|
||||||
|
|
||||||
And on the muc or the IRC channel, you can issue two commands, ".help" and ".users".
|
And on the MUC or the IRC channel, you can issue two commands, ".help" and ".users".
|
||||||
|
Loading…
Reference in New Issue
Block a user