Victor,
Without knowing the exact answer, I can steer you in the right direction. I spun up three processes each running hook --autoheal --repl, they came online as the-hook, the-hook-1 and the-hook-2. While in the repl, you get tab complete. So type "hook." then hit tab and you will see a list of options. If you run hook.proposedRank on all three you will see the hooks report 0, 1, and 2 respectively as their proposed rank. The hook with the rank of 0 is always master hook.
The other key thing with the repl is that you can see the events that fire when you disconnect the current master. I created the following gist with the log actions for all three hooks as I killed the master hook.
https://gist.github.com/3075827
Aside from the hook.proposedRank you can see some events that fire that would be worth listening for: hook::rank::accepting seems to report null if you are the master, or an integer greater than 0 if you are in line.
Let the group know how you solve your question.
Thanks,
<>Darin