First, you can put an @ in the on JOIN line so that you don't need the check to see if you're an op.
Second, please use the CODE tags around code so that it's spaced out and easier to read.
As to your question, set your variable for 60 seconds and put a check in each event... if the variable is set, then haltdef the event.
Example:
on ^@*:join:#: {
if (%JPHOLD) { haltdef }
; Put the rest of your script here.
}
Do the same for part and quit events as well.
You can use this to set the variable rather than using a timer: