can_moderate($forumid = 0, $do = '', $userid = -1, $usergroupids = '');
Code:
$forumid int Specific forum to check. If not set, will check whether the user is a moderator of any forum at all.
$do string Specific mod action to check. If not set, will check whether the user is a moderator of the forum specified in $forumid.
$userid int User ID to check. If not set, will use $vbulletin->userinfo.
$usergroupids string List of group IDs, separate by commas, to which the user belongs. Should be generally left blank.