Function to get running gamemode

Also, make pregame and tournament mode disable on non-ns2 gamemodes.
Also fixed basecommands script error with the Factions mod.