(04-27-2013, 11:18 PM)tonibm19 Wrote: [ -> ]For me it's usefull, becouse sometimes server crashes after a few hours on, so I think autorestart can help.
maybe it's also smart to post the crashes on the bugtracker

I don't think a self-restart would suffice for that, you'd need to shut down the server and run it again by an external tool, rather than an internal plugin.
I suppose it's the same as FS #361, then it needs more data - I need the compiled MCServer binary and the core dump for that.
UPDATED:
Now it includes autosave (MCServer has it but is not configurable).
One question, is there anyway to kick all players with a message?
I think you have to do ForEachPlayer in a ForEachWorld function and in there you do Player:GetClientHandle():Kick("message")
(04-28-2013, 04:49 AM)STR_Warrior Wrote: [ -> ]I think you have to do ForEachPlayer in a ForEachWorld function and in there you do Player:GetClientHandle():Kick("message")
I tried with this: cRoot:Get():ForEachWorld():ForEachPlayer():Player:GetClientHandle():Kick("Server is restarting")
It don't work
you have to do this:
local loopPlayers = function(Player)
Player:GetClientHandle():Kick("Message")
end
local loopWorlds = function(World)
World:ForEachPlayer(loopPlayers)
end
cRoot:Get():ForEachWorld(loopWorlds)
(04-28-2013, 05:01 AM)STR_Warrior Wrote: [ -> ]you have to do this:
local loopPlayers = function(Player)
Player:GetClientHandle():Kick("Message")
end
local loopWorlds = function(World)
World:ForEachPlayer(loopPlayers)
end
cRoot:Get():ForEachWorld(loopWorlds)

Thank you very much, I'm a noob making plugins.
it took me a while to figure that trick out

(04-28-2013, 05:03 AM)STR_Warrior Wrote: [ -> ]it took me a while to figure that trick out 
Thanks I tried it and is working very well. I think for now I can consider AutoSave&Restart done. Now I will try to make a plugin that adds command like /kill, /mute and /msg.
cool

good luck with that

btw maybe add something that if the restarttime is 0 it wil only save the world or something.