$ 0 0 A man has been given a restraining order after sending 'grossly offensive messages' to a convicted sex offender.