Aleph, version 1.0.0
01 Feb 2012A published, working version of the Aleph IRC library is now available. While there are plenty of features not yet implemented, it should now be possible to use it to implement a simple (or complex) IRC bot.
An example of a bot that logs all incoming messages:
:::python
#!/usr/bin/python
from aleph.core import Core
from aleph import logger
class AlephTestBot (Core):
def input (self, message):
# Log the message
logger.log(message, 6, message.command)
bot = Aleph({
'nick' : 'AlephExampleBot',
'servers' : [{
'id': 'IrcNet',
'address': 'server',
'channels': ['#aleph']
}],
}).run()
Features I hope to add in the near future include:
- A callback interface, so functions can be registered to message types - this will become the default instance of an Aleph bot and will be significantly easier to build a bot with.
- Better understanding of the irc protocol on the part of the IrcServer class, including things such as reading the MOTD and other data.
- Documentation that does not rely on looking at the source code.