You can call can_moderate() in a plugin - it's in includes/functions.php around line 6567:
Code:
/**
* Returns whether or not the given user can perform a specific moderation action in the specified forum
*
* @param integer Forum ID
* @param string If you want to check a particular moderation permission, name it here
* @param integer User ID
* @param string Comma separated list of usergroups to which the user belongs
*
* @return boolean
*/
function can_moderate($forumid = 0, $do = '', $userid = -1, $usergroupids = '')