There are two issues here. One would be a no-contact order, and then I think the second issue you're alluding to would be a firearms prohibition order.
A firearms prohibition order is made by a judge considering evidence that's presented, which would reasonably make a judge believe that an identified person or the person who is the subject of a prohibition order could be at risk of harm to themselves or others. This would be a judicial determination made on the best evidence available.
The second would be the no-contact order peace bond. Again, that has to be made with judicial authorization, taking into account evidence that's put before them.