

If lobbyWaitBeforeGame = -516,6 +519,7 len(worms) < cfg.MIN_PLAYERS: # Some players left when game not yet started + if lobbyEnoughPlayers and not sentStartGame: if lobbyEnoughPlayers and not io.sentStartGame: Global worms, gameState, lobb圜hangePresetTimeout, lobbyWaitBeforeGame, lobbyWaitAfterGame, lobbyWaitGeneral, lobbyEnoughPlayers, oldGameState Io.messageLog(("I don't understand %s." % -456,6 +457,7 controlHandlerDefault(): + elif header = "gameloopstart": #TODO: What does this do? +++ share/gamedir/scripts/dedicated_control_handler.py 18:39:33 UTC (rev -146,10 +146,11 header = "weaponselections": share/gamedir/scripts/dedicated_control_handler.py 18:31:04 UTC (rev 3155)
OPENLIEROX HOSTING A SERVER CODE
Please check the code for more errors like this, where conversion from non-classed source into classes cause trouble We should not have sentStartGame in the io class, since signals change if we sent start game or not. #def startLobby(localWorm = " Kamikazee!"): # TODO: Why do we send this with startlobby? Server doesn't catch it, + it's bad style. # Use this to force the server into lobby - it will kick all connected worms and restart the server share/gamedir/scripts/dedicated_control_io.py 15:32:25 UTC (rev 3150) If lobbyWaitBeforeGame <= 0: # Start the game

+ if lobbyEnoughPlayers and not io.sentStartGame: if lobbyEnoughPlayers and not sentStartGame: Io.messageLog(("Unable to load %s, forcing rehash of all presets" % sFile),io.LOG_WARN) Io.msg("Preset " + -350,7 +352,7 File does not exist, perhaps it was removed. Io.kickWorm(wormID, "Player with name %s already registered" % -323,10 +325,10 availablePresets, nextPresets, controlHandler, gameState + io.messageLog(("I don't understand %s." % (sig),io.LOG_ERROR)įor w in -199,7 +201,7 th != getWormSkin(wormID): # Uncomment following 3 lines to get lots of debug spam into dedicated_control_errors.log file +++ share/gamedir/scripts/dedicated_control_handler.py 17:53:37 UTC (rev -48,7 +48,7 = io.GetStdinThread() share/gamedir/scripts/dedicated_control_handler.py 15:32:25 UTC (rev 3150) Modified: share/gamedir/scripts/dedicated_control_handler.py Share/gamedir/scripts/dedicated_control_handler.py This was sent by the collaborative development platform, the world's largest Open Source development site. # OLX terminated, stdin = broken pipe, we should terminate also messageLog("Broken Pipe - exiting",LOG_CRITICAL) share/gamedir/scripts/dedicated_control_io.py 14:55:16 UTC (rev 2788) Modified: share/gamedir/scripts/dedicated_control_io.py + ded.messageLog("Python still alive", ded.LOG_INFO) While ded.gameState != -42,6 +43,10 not ded.scriptPaused: +++ share/gamedir/scripts/dedicated_control 16:32:07 UTC (rev -30,6 +30,7 nice state-machine for dedicated server share/gamedir/scripts/dedicated_control 14:55:16 UTC (rev 2788) Modified: share/gamedir/scripts/dedicated_control + fileSize2 = os.stat("dedicated_control.log").st_size + fileSize1 = os.stat("stdout.txt").st_size + print "Killing process, uptime was %f hours" % ( ( time.time() - uptime ) / 3600 ) + if fileSize1 = os.stat("stdout.txt").st_size or fileSize2 = os.stat("dedicated_control.log").st_size: + # ( os.stat("stdout.txt").st_size, fileSize1, os.stat("dedicated_control.log").st_size, fileSize2 )

+ #print "stdout.txt size %i was %i, dedicated_control.log size %i was %i" % \ +fileSize2 = os.stat("dedicated_control.log").st_size +fileSize1 = os.stat("stdout.txt").st_size +signal.signal(signal.SIGQUIT, signalHandler) +signal.signal(signal.SIGINT, signalHandler) +signal.signal(signal.SIGABRT, signalHandler) +signal.signal(signal.SIGTERM, signalHandler) + proc = os.spawnvp( os.P_NOWAIT, "sh", ) +TimeToSleep=60 # OLX and ded server will write something in logs once per 40 seconds share/gamedir/scripts/DedServerWatcher.py (rev 0) Share/gamedir/scripts/DedServerWatcher.pyĬopied: share/gamedir/scripts/DedServerWatcher.py (from rev 2787, share/gamedir/scripts/pwn0meter.py) Share/gamedir/scripts/dedicated_control_io.py Added simple script that will restart ded server if it hung
