AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   Crash map recovery (https://forums.alliedmods.net/showthread.php?t=239087)

Bacardi 04-21-2014 12:42

Crash map recovery
 
1 Attachment(s)
Plugin keeps eye of played maps and try re-load map what was before:
server crash/server reboot/server launch or reloading this plugin.

To get this work in very first time, need change few level and let each map run 30 sec.
Map what have work over 30 seconds would be loaded next time when server launch.
If map haven't run that long, then plugin try load previous map of this one.
If this map also haven't run that long, plugin not make any action anymore.
You really need check your server then :D why it crash.

If current map have running continually over 24 hour before server crash/reboot, it will not get loaded.

Rant:
If you have trouble on your server after installing this plugin, then remove it.
I haven't much knowledge about SQL, so this plugin can be really :crab:

FREE TO TRY! REMEMBER CRY, in here, this topic, so others can see!


Plugin commands & cvars
- There isn't.

Installation / Settings
Edit
...addons/sourcemod/configs/databases.cfg
and add configure marked as red
databases.cfg

- If you not own any MySQL database, use SM SQLite:
"driver" "sqlite"
It will create database in ...addons\sourcemod\data\sqlite\sourcemod.sq3
+ EXTRA:

Some reason, if you want use MySQL database,
change "driver" to "mysql" and rest of settings to connect your host.


Drop plugin *.smx in ...addons\sourcemod\plugins


*Wait second, I get this URL
Log:
22.04.2014 V0.1
- Added 24 hour limit in MySQL query

hkkelvin1995 04-21-2014 13:45

Re: Crash map recovery
 
This seems useful as sometimes I always get my server crashed
Here is my suggestion
How about use a text file to store what map are you playing instead?
Because some of ppl does host one server only which means SQL isn't necessary to them.
And it will save more time of setting up the plugin.
Anyway the plugin is nice, thanks

Bacardi 04-21-2014 14:28

Re: Crash map recovery
 
Quote:

Originally Posted by hkkelvin1995 (Post 2127696)
...
Because some of ppl does host one server only which means SQL isn't necessary to them.
...

SourceMod have SQLite extension. Just remember add that setting into config file.

Sarabveer 04-21-2014 15:06

Re: Crash map recovery
 
Hey Bacardi, thanks for the ORIGINAL plugin! And finally I know how to use it MySQL!

hkkelvin1995 04-24-2014 04:20

Re: Crash map recovery
 
Quote:

Originally Posted by Bacardi (Post 2127726)
SourceMod have SQLite extension. Just remember add that setting into config file.

Oh yes, I almost forgot that.
Btw I'm using MySQL now as I got multiple servers.
It will be painful of switching to MySQL from SQLite
I have that experience...

Root_ 04-24-2014 05:42

Re: Crash map recovery
 
Hey Bacardi! Threaded queries is fine for plugins that query data a bit often or/and during gameplay. Also threaded can be delayed for long time, so I recommend you to use simple queries. To be honest, I would just create a text file with latest map or maplist, and then load map from this instead of using database. :P
I'd like to see the maps which have been nominated/played/excluded from mapvote before server crash. So server will return with previous nominations/recently played maps/whatever. In that case database would be nice. :crab:

Bacardi 04-24-2014 11:38

Re: Crash map recovery
 
Quote:

Originally Posted by Root_ (Post 2128781)
Hey Bacardi! Threaded queries is fine for plugins that query data a bit often or/and during gameplay. Also threaded can be delayed for long time, so I recommend you to use simple queries.

Hi HI.
Yeh, this do two threaded queries, connect and ask two previous map when plugin start.
I assume, those binded statements are "normal" :/ ?

And I don't see any harm if those threaded ones get delayed very long time, best is server not get halted because of this.
But again, servers not have huge map collection, why need it.

And again, what I remember Asherkin said in somewhere, "should not leave database connection open for long time..." or something.
So, if I didn't misread, need connect/disconnect to database when need it. :3

do these changes -> later. Valve time

Quote:

Originally Posted by Root_ (Post 2128781)
To be honest, I would just create a text file with latest map or maplist, and then load map from this instead of using database. :P

yes, that would be better choice.
I just started with these for testing purpose, just a example if someone want look code.

Quote:

Originally Posted by Root_ (Post 2128781)
I'd like to see the maps which have been nominated/played/excluded from mapvote before server crash. So server will return with previous nominations/recently played maps/whatever. In that case database would be nice. :crab:

Doomsday will comes first before I succeed in this :wink:


@hkkelvin1995
This can be connect separatelly to using SQLite extension and let other connect to MySQL or where ever.
But if run (forked) multiple server from one srcds program, should install then SM to each server, more on wiki.

Tank Missile 04-29-2014 02:28

Re: Crash map recovery
 
There is already a plugin that recovers a map after a restart/crash: https://forums.alliedmods.net/showthread.php?p=889196 That one doesn't require a database.

Sarabveer 04-30-2014 08:27

Re: Crash map recovery
 
Quote:

Originally Posted by Tank Missile (Post 2131040)
There is already a plugin that recovers a map after a restart/crash: https://forums.alliedmods.net/showthread.php?p=889196 That one doesn't require a database.

The thing is, I requested this plugin because THAT plugin messed up Synergy. SourceMod "sm_map" command won't work and it also messed up the "changelevel" command. If you want to see why to requested this, goto this topic. https://forums.alliedmods.net/showthread.php?t=238673


All times are GMT -4. The time now is 16:15.

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