While I really the idea behind this hack, I think you could approachthis better by focusing on implementing it in this section instead:
PHP Code:
if ($_REQUEST['a'] == 'act')
The reason being, in the current way you are allowing this user tocircumvent email verification. IMO, you should allow the user to gointo Users Awaiting Email Verification usergroup first. Then when itcomes to activation, at THAT point test for IPmoderation and put theuser there. Otherwise, you won't know if it's a good email in the firstplace.
Hope this makes sense.