| 1 |
XMPP backend configuration |
| 2 |
========================== |
| 3 |
|
| 4 |
This backend lets you connect to any Jabber/XMPP server. |
| 5 |
To select this backend, |
| 6 |
set `BACKEND = 'XMPP'`. |
| 7 |
|
| 8 |
Extra Dependencies |
| 9 |
------------------ |
| 10 |
|
| 11 |
You need to install this dependency before using Errbot with XMPP:: |
| 12 |
|
| 13 |
pip install slixmpp pyasn1 pyasn1-modules |
| 14 |
|
| 15 |
Account setup |
| 16 |
------------- |
| 17 |
|
| 18 |
You must manually register an XMPP account for the bot |
| 19 |
on the server you wish to use. |
| 20 |
Errbot does not support XMPP registration itself. |
| 21 |
|
| 22 |
Configure the account by setting up `BOT_IDENTITY` as follows:: |
| 23 |
|
| 24 |
BOT_IDENTITY = { |
| 25 |
'username': '[email protected]', # The JID of the user you have created for the bot |
| 26 |
'password': 'changeme', # The corresponding password for this user |
| 27 |
# 'server': ('host.domain.tld',5222), # server override |
| 28 |
} |
| 29 |
|
| 30 |
By default errbot will query SRV records for the correct XMPP server and port, |
| 31 |
which should work with a properly configured server. |
| 32 |
|
| 33 |
If your chosen XMPP server does not have correct SRV records setup, |
| 34 |
you can also set the `server` key to override this. |
| 35 |
|
| 36 |
A random resource ID is assigned when errbot starts up. |
| 37 |
You may fix the resource by appending it to the user name:: |
| 38 |
|
| 39 |
BOT_IDENTITY = { |
| 40 |
'username': '[email protected]/resource', |
| 41 |
... |
| 42 |
|
| 43 |
|
| 44 |
Bot admins |
| 45 |
---------- |
| 46 |
|
| 47 |
You can set `BOT_ADMINS` to configure which XMPP users are bot administrators. |
| 48 |
For example: `BOT_ADMINS = ('[email protected]', '[email protected]')` |
| 49 |
|
| 50 |
|
| 51 |
MUC rooms |
| 52 |
--------- |
| 53 |
|
| 54 |
If you want the bot to join a certain chatroom when it starts up |
| 55 |
then set `CHATROOM_PRESENCE` with a list of MUCs to join. |
| 56 |
For example: `CHATROOM_PRESENCE = ('[email protected]',)` |
| 57 |
|
| 58 |
*Note: don't omit the comma under any circumstance!* |
| 59 |
|
| 60 |
You can configure the username errbot should use in chatrooms |
| 61 |
by setting `CHATROOM_FN`. |