fixbot/tap.py
author Tero Marttila <terom@fixme.fi>
Fri, 05 Feb 2010 22:20:59 +0200
changeset 59 43806d334fb4
parent 21 aa6df8f9c44a
permissions -rw-r--r--
prepend source name to output type
from twisted.python import usage

import nexus

class NexusOptions (usage.Options) :
    optParameters = [
        (   "uid",          "u",    "fixbot",           "user to run as"                                ),
        (   "gid",          "g",    "nogroup",          "group to run as"                               ),
        (   "irc-hostname", "s",    "irc.fixme.fi",     "IRC server hostname",                          ),
        (   "irc-port",     "p",    6667,               "IRC server port",                      int     ),
        (   "irc-nickname", "n",    "FixBotDev",        "IRC nickname",                                 ),
        (   "irc-username", "U",    "fixbot",           "IRC username",                                 ),
        (   "irc-channel",  "c",    "#fixme-test",      "IRC channel",                                  ),
        (   "api-listen"    "l",    "127.0.0.1",        "address for API server to listen on"           ),
        (   "api-port",     "P",    34888,              "port for API server to listen on",     int     ),
    ]

    optFlags = [

    ]

def makeService (config) :
    #    app = service.Application('fixbot', uid=config['uid'], gid=config['gid'])
    return nexus.makeService(config)