Initial template for commitbot. Saving work.

master
Jack Moffitt 2008-12-04 13:23:29 -07:00
commit 8db2d69000
2 changed files with 31 additions and 0 deletions

28
commitbot.py Normal file
View File

@ -0,0 +1,28 @@
from twisted.words.xish import domish
from wokkel.subprotocols import XMPPHandler
from wokkel.xmppim import AvailablePresence, Presence
NS_MUC = 'http://jabber.org/protocol/muc'
class CommitBot(XMPPHandler):
def __init__(self, room, nick):
XMPPHandler.__init__(self)
self.room = room
self.nick = nick
self.joined = False
def connectionMade(self):
self.send(AvailablePresence())
# add handlers
# join room
pres = Presence()
pres['to'] = self.room + '/' + self.nick
pres.addElement((NS_MUC, 'x'))

3
commitbot.tac.example Normal file
View File

@ -0,0 +1,3 @@
# -*- mode: python -*-
from twisted.application import service