All variables which you defined in the settings are available through
PHP Code:
$vbulletin->options['oftw_can_view']
the code snippet you're looking for is:
PHP Code:
if (!is_member_of($vbulletin->userinfo, $vbulletin->options['oftw_can_view'])) {
print_no_permission();
}
If you want to improve your setting so you can define more usergroups separated through commata, use this instead:
PHP Code:
if (!(is_member_of($vbulletin->userinfo, explode(',',$vbulletin->options['oftw_can_view'])))) {
print_no_permission();
}
Also make sure to position this code after global.php inclusion.