Raised This Month: $51 Target: $400
 12% 

[ANY] Restart Empty Server (or Map)


Post New Thread Reply   
 
Thread Tools Display Modes
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 10-14-2020 , 08:06   Re: [ANY] Restart empty server
Reply With Quote #31

Hmm, I just dunno where universally look for a map list to select from (for [ANY] game).

Perhaps, it's just better to create config file. Allow users to put desired map list by themselves. More flexibility for users and less work for me,
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is offline
Nightmare Pyro
Member
Join Date: Mar 2020
Location: Cedar Falls
Old 11-15-2020 , 14:06   Re: [ANY] Restart empty server
Reply With Quote #32

I wonder if this has time for automatic for changing maps.
Nightmare Pyro is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 11-15-2020 , 15:50   Re: [ANY] Restart empty server
Reply With Quote #33

Are you talking about penalte's request?
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 11-28-2020 , 11:39   Re: [ANY] Restart empty server
Reply With Quote #34

Updated.

Quote:
2.0 (27-Nov-2020)
Included requests by @Ejziponken, @PeterPan and @penalte.
- Added "sm_restart_empty_min_period" ConVar - Minimum period (in hours) this plugin should wait before the next restarting is allowed (0 - disable, 24 - allow once per day)
- Added "sm_restart_empty_limit_hour_start" ConVar - Allow rebooting to be started from this hour only (paired with "*_end" ConVar)
- Added "sm_restart_empty_limit_hour_end" ConVar - Allow rebooting until this hour only (paired with "*_start" ConVar)
- Added "sm_restart_empty_force_hour_start" ConVar - Start hour for force rebooting (if last reboot happened > 24 hours ago) and somebody leaves during this hour (paired with "*_end" ConVar) (-1 to disable)
- Added "sm_restart_empty_force_hour_end" ConVar - End hour for force rebooting (if last reboot happened > 24 hours ago) and somebody leaves during this hour (paired with "*_start" ConVar) (-1 to disable)
- Added "sm_restart_empty_server_start_changemap" ConVar - When server restarted, change map to the random one from the file: data/restart_empty_maps.txt (1 - Yes / 0 - No)
- Prefer "sm_map" command to change the map (if available).
- Removed ConVar "sm_restart_empty_default_map"; use file: "data/restart_empty_maps.txt" instead.
- Added "sm_time" command to check the server time (taking into account utc delta ConVar).
See updated 1st post and Suggestions on Setup Section.
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 11-28-2020 , 12:06   Re: [ANY] Restart Empty Server (or Map)
Reply With Quote #35

One more.

Quote:
2.1 (28-Nov-2020)
- Fixed mistake in a loop, causing server could restart when the last player had an index == 32.
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is offline
zombieland0302
Junior Member
Join Date: Dec 2020
Old 12-06-2020 , 08:11   Re: [ANY] Restart Empty Server (or Map)
Reply With Quote #36

Hi, I'm just run into a problem when using the new version 2.1. I don't know if this plugin is in conflict with [L4D/L4D2]WeaponHandling_API(25/09/2020 - 1.0.4) because when I remove WeaponHandling from the server is not crash when changing map. In my cfg I'm already set sm_restart_empty_method "3" so is only changes the map, not using crash method. Before that, I'm using your older plugin version with WeaponHandling is works fine.

zombieland0302 is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 12-06-2020 , 11:29   Re: [ANY] Restart Empty Server (or Map)
Reply With Quote #37

sm_restart_empty_method "3" could not produce such log.
Either you didn't change (or didn't properly save) cfg with a new value, or you have ConVar Overflow problem.

You still have value 1 or 2, that's why it crashes, which is a purpose of this plugin.
To check ConVar, enter in the console:

Code:
sm_cvar sm_restart_empty_method
and verify the value.

If the value is wrong and cfg value is correct, install [ANY] ConVars Anomaly Fixer.

Alternatively, you can re-compile plugin by changing in sp (source code):
Code:
g_ConVarMethod 				= CreateConVar("sm_restart_empty_method", 					"2"
with a desired value.
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]

Last edited by Dragokas; 12-06-2020 at 11:40.
Dragokas is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 12-06-2020 , 11:39   Re: [ANY] Restart Empty Server (or Map)
Reply With Quote #38

PS. If you would like to allow your Server on Windows to reboot automatically after the crash happened, you can disable WER.
Of course, you also have to have a recurse call line at the very end of your batch file, like:

Code:
start "" /b "%ComSpec%" /c "%~f0"
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is offline
Ejziponken
AlliedModders Donor
Join Date: Apr 2008
Old 12-06-2020 , 18:02   Re: [ANY] Restart Empty Server (or Map)
Reply With Quote #39

I'm not sure i understand this:

- sm_restart_empty_force_hour_start - def.: -1 - Start hour for force rebooting (if last reboot happened > 24 hours ago) and somebody leaves during this hour (paired with \"*_end\" ConVar) (-1 to disable)

- sm_restart_empty_force_hour_end - def.: -1 - End hour for force rebooting (if last reboot happened > 24 hours ago) and somebody leaves during this hour (paired with \"*_start\" ConVar) (-1 to disable)

If you force restart, wouldn't you just set a specific time?
If you want to force restart, it shouldn't matter if there is any players on the server or not?

Like If I want to restart my server once per 24 hours, i would set the time for normal restart at maybe 05.00 in the morning.. And if the server has players on it, it wouldn't restart. Then I need a force restart so it will restart the server even if it has players on it.. So I need a specific time to do this? So the above cvars makes no sense?
Ejziponken is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 12-06-2020 , 18:35   Re: [ANY] Restart Empty Server (or Map)
Reply With Quote #40

It is not a task scheduler or cron. I don't use any timers. You can't set a specific time with minutes accuracy.
This plugin only triggers with "player_disconnect" event!

If player_disconnect occurs between "sm_restart_empty_force_hour_start" and "sm_restart_empty_force_hour_end" hours interval, than your server will be forcibly restarted (even if they are other players on the server at the moment).
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is offline
Reply



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 02:24.


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