My question involves restraining orders in the state of: California

My friends soon to be ex filed for and got a permanent restraing order for one year. She brought her answer and declarations to court on day of hearing and filed them that day yet judge did not let her talk hardly at all. I am guessing that was because she did not file her answer days before.
Their dog was included on order and it says he keeps the dog for the entire year then dog is to be turned over to defendant ( my friend)

The dog was given to them a couple years ago but her soon to be ex paid the guy who gave it to them to come in and say that he gave the dog only to him. My friend can prove She has been the sole caretaker of the dog for almost the entire time. The dogs microchip has only her name and out of 9 vet bills only one was paid by him. He only added the dog to hurt her.

What form would she file to get a judge to listen to her to possibly get one or more of the following:
Ask for custody of dog but She is happy to allow visitation to her soon to be ex through a neutral person
Or she being being allowed visitation through a neutral person
To be guaranteed that he will not take dog out of country as he is a Canadian citizen and he has threatened to just go back to Canada with dog.

Her soon to be ex told judge he had terminal cancer which is why I think judge gave dog to him for one year and then to her. He has had thyroid cancer since 2004 and it is not going to kill him a matter of fact the dr said that the alcohol he uses will kill him way before the cancer does.

She just needs to know what form to use and how to get judge to listen to her about this. The dog is like a child to her. To go a year without seeing him would be horrible for the dog as well. She took the dog everywhere and plenty of witnesses can attest to that.

Thank you.