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 03-23-2021 , 11:51   Re: [ANY] Restart Empty Server (or Map)
Reply With Quote #51

Use the method suitable for your game.

1 - crash (looks like doesn't exist in your game)
2 - _restart
3 - only map change (without server restart).

Quote:
Originally Posted by found amxx bug View Post
it doesn't trigger player_disconnect till the value is 2
It makes no sense. player_disconnect should be always triggered whenever the player leaves the game.
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is offline
found amxx bug
Junior Member
Join Date: Dec 2009
Old 03-23-2021 , 12:20   Re: [ANY] Restart Empty Server (or Map)
Reply With Quote #52

now both values (1(restart),3(map change)) are working now
it is normal that when I start the server it changes the map immediately?

Last edited by found amxx bug; 03-23-2021 at 12:28.
found amxx bug is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 03-23-2021 , 14:36   Re: [ANY] Restart Empty Server (or Map)
Reply With Quote #53

Read 1st post.
ConVar "sm_restart_empty_server_start_changemap"
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is offline
Mr. Man
Veteran Member
Join Date: Mar 2011
Location: Huh?
Old 07-19-2021 , 02:42   Re: [ANY] Restart Empty Server (or Map)
Reply With Quote #54

Hey, been using this for a while and noticed something odd - on some custom L4D2 maps the server wouldn't restart to the default set of maps listed in the .txt file in /data/. It would continue being on the custom map still.
__________________

Last edited by Mr. Man; 07-19-2021 at 02:45.
Mr. Man is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 07-19-2021 , 08:22   Re: [ANY] Restart Empty Server (or Map)
Reply With Quote #55

Mr. Man, your convar configs would be helpful.

Also, see the log: addons/sourcemod/logs/restart.log - whenever you receive an odd behaviour whether it contains info about restart map action. If yes, it is a problem of your server not to obey the change map command.
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]

Last edited by Dragokas; 07-19-2021 at 08:25.
Dragokas is offline
Mr. Man
Veteran Member
Join Date: Mar 2011
Location: Huh?
Old 07-20-2021 , 22:56   Re: [ANY] Restart Empty Server (or Map)
Reply With Quote #56

I don't see anything unusual. Here's both:

restart.log
Code:
L 07/20/2021 - 10:17:07: Changing map to: c8m1_apartment... Reason: Server is restarted
L 07/20/2021 - 12:47:27: Sending 'crash'... Reason: Empty Server
L 07/20/2021 - 12:47:27: Sending 'crash'... Reason: Empty Server
L 07/20/2021 - 12:47:53: Changing map to: c5m1_waterfront... Reason: Server is restarted
L 07/20/2021 - 14:33:27: Sending 'crash'... Reason: Empty Server
L 07/20/2021 - 14:33:27: Sending 'crash'... Reason: Empty Server
L 07/20/2021 - 14:33:53: Changing map to: c9m1_alleys... Reason: Server is restarted
L 07/20/2021 - 16:24:19: Sending 'crash'... Reason: Empty Server
L 07/20/2021 - 16:24:19: Sending 'crash'... Reason: Empty Server
L 07/20/2021 - 16:24:46: Changing map to: c7m1_docks... Reason: Server is restarted
L 07/20/2021 - 17:17:03: Changing map to: c14m1_junkyard... Reason: Server is restarted
L 07/20/2021 - 19:57:49: Sending 'crash'... Reason: Empty Server
L 07/20/2021 - 19:57:49: Sending 'crash'... Reason: Empty Server
L 07/20/2021 - 19:58:15: Changing map to: c14m1_junkyard... Reason: Server is restarted
L 07/20/2021 - 20:59:28: Sending 'crash'... Reason: Empty Server
L 07/20/2021 - 20:59:28: Sending 'crash'... Reason: Empty Server
L 07/20/2021 - 20:59:54: Changing map to: c8m1_apartment... Reason: Server is restarted
and the .cfg file:
Code:
// This file was auto-generated by SourceMod (v1.10.0.6503)
// ConVars for plugin "L4D2_restartempty.smx"


// Grace period (in sec.) waiting for new player to join until actually decide to restart the server
// -
// Default: "1.0"
sm_restart_empty_delay "30.0"

// Enable plugin (1 - On / 0 - Off)
// -
// Default: "1"
sm_restart_empty_enable "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)
// -
// Default: "-1"
sm_restart_empty_force_hour_end "-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)
// -
// Default: "-1"
sm_restart_empty_force_hour_start "-1"

// Allow rebooting until this hour only (paired with "*_start" ConVar)
// -
// Default: "24"
sm_restart_empty_limit_hour_end "24"

// Allow rebooting to be started from this hour only (paired with "*_end" ConVar)
// -
// Default: "0"
sm_restart_empty_limit_hour_start "0"

// When server is empty, what to do? 1 - _restart, 2 - crash (use if method # 1 is not work), 3 - just change map
// -
// Default: "2"
sm_restart_empty_method "2"

// Minimum period (in hours) this plugin should wait before the next restarting is allowed (0 - disable, 24 - allow once per day)
// -
// Default: "0"
sm_restart_empty_min_period "1"

// When server restarted, change map to the random one from the file: data/restart_empty_maps.txt (1 - Yes / 0 - No)
// -
// Default: "0"
sm_restart_empty_server_start_changemap "1"

// If you have Accelerator extension, you need specify here order number of this extension in the list: sm exts list
// -
// Default: "0"
sm_restart_empty_unload_ext_num "0"

// If your server has incorrect time, you can set UTC correction hours here (they will be appended to a server time)
// -
// Default: "0.0"
sm_restart_empty_utc_delta "0.0"
I did notice that in the restart log that the crashes sometimes doesn't switch maps.
__________________
Mr. Man is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 07-21-2021 , 10:36   Re: [ANY] Restart Empty Server (or Map)
Reply With Quote #57

Well, I have no idea.
If that thing can be definitely reproduced on the same custom map, let me know, and I'll take a look.

For now, you can try set ConVar "sv_hibernate_when_empty" to 0 in your server.cfg and try luck with it.
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]

Last edited by Dragokas; 07-21-2021 at 10:37.
Dragokas is offline
Mi.Cura
Veteran Member
Join Date: Dec 2016
Location: Brazil
Old 07-29-2021 , 12:55   Re: [ANY] Restart Empty Server (or Map)
Reply With Quote #58

Hello Drakogas, I would like to report, and ask if this behavior is correct.

After the last valve update, it doesn't seem to be working correctly:
(I don't know this may be to blame),

The map is not changed when the server is empty :

sm_restart_empty_delay "60.0"
sm_restart_empty_enable "1"
sm_restart_empty_method "3"
sm_restart_empty_server_start_changemap "0"


- Before, when the server was empty, the map changed to another random campaign automatically after 60 seconds.

If I leave this config:
(sm_restart_empty_server_start_changemap "1")
the map changes only when a player connects..
__________________
Mi.Cura | Modded Servers | L4D2
https://steamcommunity.com/groups/micuramodzombie

Last edited by Mi.Cura; 07-29-2021 at 13:02.
Mi.Cura is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 07-29-2021 , 15:44   Re: [ANY] Restart Empty Server (or Map)
Reply With Quote #59

Well, I can't reproduce your problem.

I used L4D2 Linux, sm v.1.11.0.6731
I set:

sm_restart_empty_delay "10.0"
sm_restart_empty_enable "1"
sm_restart_empty_method "3"
sm_restart_empty_server_start_changemap "0"

Also, I removed all maps in restart_empty_maps.txt, excepting one: c14m1_junkyard to be sure.
Also, I have in server.cfg:

sm_cvar sv_hibernate_when_empty "1"

I leave the server, and this is my console.log after 10 seconds:
Spoiler
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is offline
Mi.Cura
Veteran Member
Join Date: Dec 2016
Location: Brazil
Old 07-30-2021 , 09:26   Re: [ANY] Restart Empty Server (or Map)
Reply With Quote #60

Hello Drakogas,

Thanks for helping me, trying to replicate the error.
I will check here again, maybe another plugin may be causing this.

Note: I have normal messages in the LOG, but the map doesn't really change. If the server is in a custom campaign, it stays in the custom campaign, it doesn't change.

Server: (Windows, Dedicated) v2.2.1.3
MetaMod:Source v1.10.7
SourceMod v1.10.0.6503

Spoiler
__________________
Mi.Cura | Modded Servers | L4D2
https://steamcommunity.com/groups/micuramodzombie

Last edited by Mi.Cura; 07-30-2021 at 09:35.
Mi.Cura 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 14:20.


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