Beispiel #1
0
def build_protocol():
    if have_required_settings("MANHOLE_BIND_ADDRESS", "MANHOLE_PASSWORD"):
        host, port = parse_hostname(get_setting("MANHOLE_BIND_ADDRESS"))
        manhole = manhole_factory()
        
        reactor.listenTCP(port, manhole, interface=host)
        
        return manhole
Beispiel #2
0
def build_protocol():
    if have_required_settings("ECHOER_BIND_ADDRESS"):
        host, port = parse_hostname(get_setting("ECHOER_BIND_ADDRESS"))
        echoer = Echoer()
        
        reactor.listenUDP(port, echoer, interface=host)
        
        return echoer
Beispiel #3
0
def build_protocol():
    if have_required_settings("NICKNAME", "IRC_CONNECTIONS"):
        irc = IRC(get_setting("NICKNAME"), get_setting("IRC_CONNECTIONS"))
        
        return irc