The function defines a boolean condition (true/false), based on the string you input.
Then, you simply use that condition into your templates.
You can use arbitrary IP values, as described in the above script comments.
The script has a failsafe feature. If for some reason you use something like: $allowediplist = '';
check_allowed_ip($allowediplist);
the script will not execute any code. I made this thinking that someone might add a vbulletin option and leave it emply by default. In this way the function will not burden the server with un-needed executed code.