I'm not sure if you can use the hook for it since what you really need is to set a condition to then skip the code below. Or actually, maybe what you need to do is use the hook to set a paramenter that will make it so that error doesn't get evaled.... hmmmm....
PHP Code:
if (can_moderate(0, '', $userinfo['userid'], $uglist)
AND !($vbulletin->userinfo['permissions']['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['cancontrolpanel'])
AND !($vbulletin->userinfo['permissions']['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['ismoderator'])
)
Do you know which of those conditions they are failing? If you do, set the condition in the hook to not fail. (I apologize if I'm not making complete sense right now as I've only had one cup of coffee so far.)