My server have a samove-command, that I would like to implement into a script where I can rightclick a user and type in the moveto-channel

I've written both a sajoin and sapart without problems, but
.sajoin:/sajoin $* $$?="Move to:"
.sapart:/sapart $* # See you later, Alligator!

My trouble starts when I get three inputs; nick, fromchan and tochan

The excisting command (that works if I type it in) is /samove username fromchan tochan

I'm on a little bit deep water here, but I've tried: .samove:/samove $1 $chan $* $$?="Move to:"
..but obviously it isnt right.

Does anyone know how to solve it?