Exemplo n.º 1
0
def main():
    if USE_WX:
        from gui import Setup
        app = Setup(reactor)
        reactor.registerWxApp(app)

    print "Master Server"
    print "->Initializing"

    server = Server(CONFIG["Master Port"])
    server.startServices()

    from telnetmanhole import MakeFactory
    from twisted.application import app, service, strports
    ips = ["127.0.0.1"]
    f = MakeFactory(ips, CONFIG["Manhole Username"],
                    CONFIG["Manhole Password"])
    reactor.listenTCP(CONFIG["Manhole Port"], f)

    #from webserver import MakeWebServer
    #MakeWebServer()

    from mud.common.persistent import Persistent
    Persistent._connection.getConnection().text_factory = lambda x: unicode(
        x, "utf-8", "ignore")

    CheckDB()

    ConfigureSettings()

    TransactionTick()

    print "->Server is up"

    reactor.run()

    TransactionTick(True)
Exemplo n.º 2
0
    stats.addRole(Role.byName("Stats"))

    NewPlayerAvatar.ownerPublicName = PUBLICNAME

    #--- Application
    from mud.server.app import Server


    THESERVER = Server(WORLDPORT)
    THESERVER.allowConnections = False
    THESERVER.throttleUsage = True
    if MAXPLAYERS == -1:
        MAXPLAYERS = 1024

    THESERVER.roleLimits["Player"]=MAXPLAYERS
    THESERVER.startServices()


    GAMEPROCESS = None

    ZONESSPAWNED = False


    #XXX starting zones simultaneously crashes

    ZONECOUNT = 0
    def LiveZoneCallback(zinst):
        global ZONECOUNT
        if ZONECOUNT == -1: #hack!
            return
        print zinst.name, "is live"
Exemplo n.º 3
0
              account=account,
              allowGuests=True,
              maxLivePlayers=-1,
              maxLiveZones=-1,
              demoWorld=False)

    user.password = CONFIG["World Password"]
    account = Account.byPublicName(user.name)
    account.password = user.password

    cserver = User.byName("CharacterServer")
    cserver.password = CONFIG["Character Server Password"]


server = Server(CONFIG["Master Port"])
server.startServices()

from telnetmanhole import MakeFactory
from twisted.application import app, service, strports
ips = ["127.0.0.1"]
f = MakeFactory(ips, CONFIG["Manhole Username"], CONFIG["Manhole Password"])
reactor.listenTCP(CONFIG["Manhole Port"], f)

#from webserver import MakeWebServer
#MakeWebServer()

from mud.common.persistent import Persistent
Persistent._connection.getConnection().text_factory = lambda x: unicode(
    x, "utf-8", "ignore")

CheckDB()
Exemplo n.º 4
0
        user.addRole(Role.byName("Player"))
        user.addRole(Role.byName("World"))
        #fix me, this shouldn't really be here... and allowGuests is used for testing worlds
        World(name="Premium MMORPG", announcePort=int(CONFIG["Default World Port"]), account=account, allowGuests=True,maxLivePlayers=-1,maxLiveZones=-1,demoWorld = False)

        
    user.password = CONFIG["World Password"]
    account = Account.byPublicName(user.name)
    account.password = user.password
    
    cserver = User.byName("CharacterServer")
    cserver.password = CONFIG["Character Server Password"]
    
    
server = Server(CONFIG["Master Port"])
server.startServices()

from telnetmanhole import MakeFactory
from twisted.application import app, service, strports
ips = ["127.0.0.1"]
f= MakeFactory(ips, CONFIG["Manhole Username"], CONFIG["Manhole Password"])
reactor.listenTCP(CONFIG["Manhole Port"], f)

#from webserver import MakeWebServer
#MakeWebServer()

from mud.common.persistent import Persistent
Persistent._connection.getConnection().text_factory = lambda x: unicode(x, "utf-8", "ignore")

CheckDB()
Exemplo n.º 5
0
    stats.addRole(Role.byName("Stats"))

    NewPlayerAvatar.ownerPublicName = PUBLICNAME

    #--- Application
    from mud.server.app import Server


    THESERVER = Server(WORLDPORT)
    THESERVER.allowConnections = False
    THESERVER.throttleUsage = True
    if MAXPLAYERS == -1:
        MAXPLAYERS = 1024

    THESERVER.roleLimits["Player"]=MAXPLAYERS
    THESERVER.startServices()


    GAMEPROCESS = None

    ZONESSPAWNED = False


    #XXX starting zones simultaneously crashes

    ZONECOUNT = 0
    def LiveZoneCallback(zinst):
        global ZONECOUNT
        if ZONECOUNT == -1: #hack!
            return
        print zinst.name, "is live"