Theres a few ways you could do this...
1. Read config files for every map, goto 2 if not found
2. Compare the first 3 letters of the mapname with a table that lists the prefix ( ie. "de_" ) and it's type ( ie. GTYPE_DE )
3. As said by PMB, if all else fails assume deathmatch >
