I thought it would be neater if you could add any number of maps instead of just 2. I just hacked this together, so it's not testet througly, but at least it works.
In soldat.ini: add a new tag in the end of the file saying [MAPS]. There, just add the number of maplists you would want, and for each of them, the number of players for wich they should activate. Use this template:
[MAPS]
Maplist1_Players = 2
Maplist1_Filename = maplist_2players.txt
Maplist2_Players = 6
Maplist2_Filename = maplist_6players.txt
Maplist3_Players = 12
Maplist3_Filename = maplist_12players.txt
Now, when the server has 2-5 players it uses maplist_2players.txt, then when there are 6-11 players it uses maplist_6players.txt and if there are 12 or more it uses maplist_12players.txt.
I'd be happy to hear of any bugs! Thanks
EDIT 1:const
MAX_MAPLISTS = 128;
If you create more maplists than MAX_MAPLISTS without changing this variable, they will simply be ignored. The maplist designed for MOST players have highest prioity, and then falling.
EDIT 2:I forgot to mention, if there is 0-1 players online, the script uses default maplist.