well when the dm leaves, players are left there and the only way to exit is to quit wc3,
so what you should do is: when dm leaves during player's character selection, player automatically exits the character selection menu and ends up in the map itself where he could simply quit the game