Thats not right, as mentionned
Quote an attacking player carrying the ball comes into
contact with the Referee or a Touch Judge or an
encroaching spectator in the opponents’ in-goal
and play is thereby irregularly affected.'"
But if the ball is kicked at the referee its a goal line drop out
Quote Drop-out from 4. The game is restarted with a drop-out by a
Goal line defending player from the centre of his goal line if:
(a) a defending player last touches the ball before it
goes over the dead ball line or into touch in-goal.
(b) a defending player accidentally infringes in the
in-goal area.
(c) a defending player touches down in the in-goal
area.
(d) a defending player in possession is tackled in the
in-goal area.
(e) a defending player kicks the ball into touch on
the full from his own in-goal.
(f) a defending player kicks or passes the ball in his
own in-goal and the ball accidentally strikes an
opponent and goes into touch in-goal or over the
dead ball line.
(g) the ball or a defending player carrying the ball
touches the referee, a touch judge or an
encroaching spectator in the in-goal area and
play is thereby irregularly affected.
(h) the ball goes over the dead ball line or into touch
in-goal other than on the full from a kick off from
the centre of the halfway line .
(i) where a kick is made dead by a defending
player straddling the dead ball line or touch in
goal line.'"