17-2. Unauthorized Attendance
a. Match Play
In match play, an opponent or his caddie shall not, without the authority or prior knowledge of the player, attend, remove or hold up the flagstick while the player is making a stroke or his ball is in motion.
b. Stroke Play
In stroke play, if a fellow-competitor or his caddie attends, removes or holds up the flagstick without the competitor’s authority or prior knowledge while the competitor is making a stroke or his ball is in motion, the fellow-competitor shall incur the penalty for breach of this Rule. In such circumstances, if the competitor’s ball strikes the flagstick, the person attending it or anything carried by him, the competitor incurs no penalty and the ball shall be played as it lies, except that, if the stroke was played from the putting green, the stroke shall be cancelled, the ball replaced and the stroke replayed.
PENALTY FOR BREACH OF RULE 17-1 or -2:
Match play — Loss of hole; Stroke play — Two strokes.