evandrocoan / MultiModServer

It is a Multi-Mod plugin's configurations for Amx Mod X - https://forums.alliedmods.net/showthread.php?t=273018
GNU General Public License v3.0
17 stars 17 forks source link

Ban maps based on their core name #68

Open evandrocoan opened 7 years ago

evandrocoan commented 7 years ago

Skyliner: And a second question. I got for exemple 3 types of the map assault, de_assault, cs_assault and cs_assault_shadow. It is possible to make something to ban for 6 maps all the assault maps?

https://forums.alliedmods.net/showthread.php?p=2523716#post2523716

The map name core should be guessed using this algorithm/strategy bellow:

  1. Find an underscore from the first character name.
  2. Copy the next characters after the underscore until find the end of the map name or another underscore.
  3. Add the copied word to the recentMapsCore.dat file.

It would not use the same value on the cvar gal_banrecent, to not interfere within the standard behavior. It would created a new cvar called gal_banrecent_core which would ban maps based on their core name.

// Specifies how many of the most recent maps are disallowed from a map
// vote. For example:
//
// I got for example 3 types of the `assault` maps: de_assault,
// cs_assault and cs_assault_shadow. It is possible to make something to
// ban all the assault maps?
//
// The map name core should be guessed using this algorithm/strategy
// bellow:
//
// 1. Find an underscore from the first character name.
// 2. Copy the next characters after the underscore until find the end
//    of the map name or another underscore.
// 3. Add the copied word to the `recentMapsCore.dat` file.
//
// If you specify a value greater than the number of maps in your server,
// it will automatically ban only the maximum allowed.
//
// A value of 0 will disable this feature.
//
// Default: 0
gal_banrecent_core 0

This also would require a new way to ban limit the maximum allowed map bans. Now when the menu ran out of maps due the ban feature, it would need to invoke this ban feature core and un-ban the necessary number of maps, and keep filling the voting menu.

Also add this technique to the current map ban feature for robustness and create the new cvar gal_banrecent_room for both ban features which will allow un-ban some maps beyond the voting menu map choices, so the random map feature can be random. Otherwise it would follow a sequence after all maps being banned.

// Force un-ban some maps beyond the voting menu map choices, therefore
// the random map feature can be random. Otherwise it would follow a
// sequence after all maps being banned, when the maximum allowed ban
// limit is reached.
//
// Default: 0
gal_banrecent_room 3
ish12321 commented 7 years ago

fy_snow and de_snow both would have same core name .. This feature is i think not important