AutoSave&Restart v1
#11
(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 Wink
Reply
Thanks given by:
#12
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.
Reply
Thanks given by:
#13
UPDATED:
Now it includes autosave (MCServer has it but is not configurable).

One question, is there anyway to kick all players with a message?
Reply
Thanks given by:
#14
I think you have to do ForEachPlayer in a ForEachWorld function and in there you do Player:GetClientHandle():Kick("message")
Reply
Thanks given by:
#15
(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
Reply
Thanks given by:
#16
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)
Reply
Thanks given by:
#17
(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)
Smile Thank you very much, I'm a noob making plugins.
Reply
Thanks given by:
#18
it took me a while to figure that trick out Smile
Reply
Thanks given by:
#19
(04-28-2013, 05:03 AM)STR_Warrior Wrote: it took me a while to figure that trick out Smile
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.
Reply
Thanks given by:
#20
cool Smile good luck with thatBig Grin btw maybe add something that if the restarttime is 0 it wil only save the world or something.
Reply
Thanks given by:




Users browsing this thread: 2 Guest(s)