Raised This Month: $32 Target: $400
 8% 

[L4D2] mp_gamemode not in sv_gametypes


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Mystik Spiral
Senior Member
Join Date: Oct 2020
Location: Orlando, FL
Old 04-18-2023 , 16:39   [L4D2] mp_gamemode not in sv_gametypes
Reply With Quote #1

My server is configured with sv_gametypes "coop,realism,nightmaredifficulty", but sometimes I see versus or mutation matches on my server, with all eight players joining at the same time. I suspect the versus lobby leader set mm_dedicated_force_servers to my server's IPORT then started the game from lobby.

Should mm_dedicated_force_servers override sv_gametypes?

If so, what would be the best way to reject connections for gamemodes not in sv_gametypes? I see this happen all the time for regular match-making (not using mm_dedicated_force_servers)... my server wakes up from hibernation, indicates mp_gamemode does not match sv_gametypes, and goes back to hibernation (and presumably that lobby continues searching for a server that matches). If possible, when someone uses mm_dedicated_force_servers, I would like to allow that lobby to continue searching for a server match instead of just killing it when it reaches my server.
Mystik Spiral is offline
Mystik Spiral
Senior Member
Join Date: Oct 2020
Location: Orlando, FL
Old 04-21-2023 , 09:24   Re: [L4D2] mp_gamemode not in sv_gametypes
Reply With Quote #2

I confirmed this issue and can reproduce it. As long as mm_dedicated_force_servers is set, I can connect to my server with any game mode... it will override sv_gametypes.

I was thinking about creating a simple plugin that checks mp_gamemode when OnPluginStart fires. If mp_gamemode is not in sv_gametypes, then kick all players (with a message that the game mode is not supported on this server), then set mp_gamemode to something in sv_gametypes.

Does anyone have a better idea?
Mystik Spiral is offline
Mystik Spiral
Senior Member
Join Date: Oct 2020
Location: Orlando, FL
Old 04-23-2023 , 19:05   Re: [L4D2] mp_gamemode not in sv_gametypes
Reply With Quote #3

I created a small plugin to handle this. I will run it for a while on my server and if no problems, I will post it. The plugin just rejects client connections when mp_gamemode is not in the sv_gametypes list.
Mystik Spiral is offline
Mystik Spiral
Senior Member
Join Date: Oct 2020
Location: Orlando, FL
Old 04-25-2023 , 21:25   Re: [L4D2] mp_gamemode not in sv_gametypes
Reply With Quote #4

Plugin link
https://forums.alliedmods.net/showthread.php?t=342570
Mystik Spiral 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 15:25.


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