view MoinMoin/jabber/ @ 2071:aa761813d7bd

Silly changes to test CIA.
author Karol 'grzywacz' Nowak <>
date Thu, 31 May 2007 21:31:40 +0200
parents 4e123eb32380
children 9c66c85a6a70
line wrap: on
line source
# -*- coding: iso-8859-1 -*-
    MoinMoin - jabber bot main file

    This is a bot for notification and simple editing
    operations. Developed as a Google Summer of Code 

    @copyright: 2007 by Karol Nowak <>
    @license: GNU GPL, see COPYING for details.

import sys
import os

from config import Config
from xmppbot import XMPPBot
from xmlrpcbot import XMLRPCServer, XMLRPCClient
from Queue import Queue

if __name__ == "__main__":
    args = sys.argv
    if "--help" in args:
        print """MoinMoin notification bot
        Usage: %(myname)s [--server server] [--xmpp_port port] [--user user] [--resource resource] [--password pass] [--xmlrpc_host host] [--xmlrpc_port port]
        """ % { "myname": os.path.basename(args[0]) }
        raise SystemExit
    # TODO: actually accept options from the help string

    commands_from_xmpp = Queue()
    commands_to_xmpp = Queue()
        xmpp_bot = XMPPBot(Config, commands_from_xmpp, commands_to_xmpp)
        xmlrpc_client = XMLRPCClient(Config, commands_from_xmpp)
        xmlrpc_server = XMLRPCServer(Config, commands_to_xmpp)
    except KeyboardInterrupt, i:
        print i