Raised This Month: $ Target: $400
 0% 

Server Crash Recovery


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Liverwiz
Veteran Member
Join Date: Feb 2010
Location: Maryland
Old 06-19-2012 , 14:41   Server Crash Recovery
Reply With Quote #1

Whats the code to recover after a server crash?
I've seen it around but i can't figure out what to search for. Asking is just easiest, as well as having a dedicated thread for it.
__________________
What an elegant solution to a problem that doesn't need solving....
Liverwiz is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 06-19-2012 , 14:55   Re: Server Crash Recovery
Reply With Quote #2

What do you want to recover? Last map played?
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Liverwiz
Veteran Member
Join Date: Feb 2010
Location: Maryland
Old 06-19-2012 , 15:07   Re: Server Crash Recovery
Reply With Quote #3

Just check to see if it has just recovered after a restart/crash.

http://forums.alliedmods.net/showpos...1&postcount=22
That is what i'm trying to fix.
__________________
What an elegant solution to a problem that doesn't need solving....
Liverwiz is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 06-19-2012 , 15:11   Re: Server Crash Recovery
Reply With Quote #4

https://forums.alliedmods.net/showpo...83&postcount=8
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Liverwiz
Veteran Member
Join Date: Feb 2010
Location: Maryland
Old 06-19-2012 , 16:05   Re: Server Crash Recovery
Reply With Quote #5

Quote:
Originally Posted by Exolent[jNr] View Post
Thanks, but that's not what i'm looking for. What i need is code that goes in the #defines that tells the plugin if it was just rebooted.
__________________
What an elegant solution to a problem that doesn't need solving....
Liverwiz is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 06-19-2012 , 16:14   Re: Server Crash Recovery
Reply With Quote #6

That's not possible, because #defines are resolved at compile time not run time.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Liverwiz
Veteran Member
Join Date: Feb 2010
Location: Maryland
Old 06-19-2012 , 16:57   Re: Server Crash Recovery
Reply With Quote #7

Quote:
Originally Posted by Exolent[jNr] View Post
That's not possible, because #defines are resolved at compile time not run time.
I know. That was a bad description.
How can i tell when the server just started?
__________________
What an elegant solution to a problem that doesn't need solving....
Liverwiz is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 06-19-2012 , 17:53   Re: Server Crash Recovery
Reply With Quote #8

Every map end create a file that is empty, used for checking if it was created last map.
On map start, check if this file exists. If not, the server just started. If it does, delete it.

This won't work if your server crashes on map change, such as missing a required model for a map.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:10.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode