my nick is goku, my alternative nick is goku[bem-ti-net]

Im chating and sudenlly i get disconected. And when im connecting again, my nick (goku) is still on the server, so im connected with goku[bem-ti-net] nick. It not a problem to tupe a /ns ghost my-pass , and type //nick goku | ns identify my-pass, but is that possible without tuping ? like this command;

on me:CONNECT:{
if ( $me == goku[bem-ti-net] ) { ns ghost goku my-pass | /nick goku | ns identify my-pass | timer 1 .join #my-chan } }

is this ok, or you have a better idea ?
confused