When making a protective order, as defined in Section 6218, where both parties are present in court, the court shall inform both the petitioner and the respondent of the terms of the order, including notice that the respondent is prohibited from owning, possessing, purchasing or receiving or attempting to own, possess, purchase or receive a firearm or ammunition, and including notice of the penalty for violation.