>if(I.exclude_gamemodes.len && ticker && ticker.mode.name in I.gamemodes)

should be 

>if(I.exclude_gamemodes.len && ticker && ticker.mode.name in I.exclude_gamemodes)