When I thought about asking this I was watching a StarCraft 2 replay, but I guess this can happen on any game that has spectators, in which secrecy is a major part of the game (like hiding your tech from your opponent in sc2).
How (if at all) are users prevented from spectacting a game and feeding information to a player via (for example) instant messaging? I'm guessing friends or clan members would do that.
Is this just ignored? Is it not a big problem in general?
I guess it depends on how the spectating engine is implemented. For example in Wolfenstien: Enemy Territory. The game that the spectators were watching was delayed by I think 5 minutes or something like that. There is a purposeful delay built in so that this can't happen.
I assume SC 2 has something similar built in, otherwise it'd be a big problem.
In most games, if for any reason you don't trust another clan, or at some point they were suspected of cheating, you should be able to ask/demand that there are no spectators for that game.
To my knowledge there is no such mechanism in SC2 since the observing happens live as the observers are in the game and don't access the game via an external stream, so cheating might be possible, but since the professional tournaments are usually in a controlled environment it's unlikely to happen.
For normal (custom) Games with Observers there is no way to be sure, but usually it's assumed that the players and observers are honorable people.
For IM or similar most games are simply too fast-paced and a Message that distracts for 1-2 seconds might hurt more than it helps.
In Yahoo! games (like card games) you can choose to hide your hand from any spectators. If you're not a trusting person or suspect something fishy you can always hide your hand. A lot of video games don't even support spectators.
If real-time spectators are allowed there is really no way to detect the relay of information because they could always just pick up the phone and call the player and you'd have no way of knowing that because it is completely independent of the computer. If they make it too obvious they are cheating you can often save the replay and report them.