xib
Warning : I neither use nor maintain this project anymore.
Introduction
xib is an XMPP ↔ IRC bridge bot written in python. It is licensed under GPLv3.
You can get the source code from the xib git repository : git://changaco.net/xib.git
Current version : 0.3
xib is neither stable nor feature-complete, if you want/need a failsafe bot, don't use this one !
xib dependencies
- python 2.6
- xmppony 0.1
- argparse (added in xib 0.2 for the new command system)
Note : xib includes its own version of the old irclib.py because this library doesn't correctly handle the different character encodings.
How to install and run xib bots
If you are not installing xib from a package manager I suggest you put the files in /usr/local/share/xib
To start xib bots just execute start_bots_from_xml_config.py, this script takes the path to a configuration file as optional first parameter, if no such parameter is given it will search the current directory for a file named config.xml.
How to write a configuration file understandable by start_bots_from_xml_config.py
Copy example_config.xml and modify it to fit your needs.
The different modes of the xib bots
mode is a per-bridge attribute, it can take three values :
normal: the bot connects on IRC on behalf of XMPP users and connects on XMPP on behalf of IRC users.limited: the bot only connects on XMPP on behalf of IRC users but NOT on IRC on behalf of XMPP.minimal: the bot does not connect on behalf of the participants.
Configure what the bot says on rooms
say_level is a per-bridge attribute, it can take 6 values :
all: default value, say everythinginfo: contains participants' joining and leaving events in limited and minimal modesnoticewarning: contains nickname conflicts and everything that is not fatal to the bridgeerrornothing: don't say a word
How to log xib bots output
xib does not directly handle logging for now so you have to do it the old school way, for example :
mkdir /var/log/xib
touch /var/log/xib/1.log
cd /usr/local/share/xib && ./start_bots_from_xml_config.py 1>/var/log/xib/log 2>&1 &
Changelog
- 0.3 :
- new mode
bypass, this allows to connect more than one bot for each IRC server without having so many nickname conflicts that the bot looks like it is in limited mode - new bridge attribute
irc_connection_interval(in seconds) - removed automatic switching to limited mode
- fixed the
haltcommand - created 6 commands:
- change-bridges-mode
- connections
- irc-connections
- xmpp-connections
- debug
- stop-bot
- renamed and modified 3 commands:
- remove-bridge → remove-bridges
- restart-bridge → restart-bridges
- stop-bridge → stop-bridges
- improved the quality of the code
- finally, as usual, fixed many bugs and introduced new ones
- new mode
0.2 :
- fixed many many bugs
- new command system
- rejoin on kick and leave on ban
- added an ugly ping mechanism to keep the connections open
- don't create an XMPP duplicate of ChanServ
- "/me" handling
- split long messages when sending on IRC
0.1.1 :
- fixed bug that prevented the bot from connecting to freenode and all other servers that don't send
umode - added optional parameter to
start_bots_from_xml_config.py
- fixed bug that prevented the bot from connecting to freenode and all other servers that don't send
0.1 : Initial release
Comments
Add a comment