Require passkey to enter chatrooms.

I know there's some meta-programming in here ands its :-1: but i don't see a way around it. Let me know if there is!
Any way to put this into a script function and call it here?