There is at least one simple way, but I won't proclaim it.
Why? I can't imagine a decent reason why to do it - if you want to "protect" your script of malicious scripts: malicious code can do more damage than turning remotes off, and can break any scriptable sollution for your request (if smart enough). On the other hand side, a "remote off protection" makes up a "feature" for malicious code itself.
/remote is a global "main switch" - a single "power tool" (script) should not override it.