because
a] the raw evenm works fine as it was. It does as he asked. He'll just need to modify it a bit, like in the raw event, check if the variable $+(%,req,$2) exists before doing anything else. that should take care of both the /hop and the /join problem
b] timers are notoriously unreliable in all matters that deal with joining channels, services of any kind of automated system that could be lagged, but whose response is absolutely necessary for the script. In such cases, in good scripting, one never uses a timer, but always an event triggered by the response.
on *:TEXT:!request*:#channelname: {
if ($2 == $me) && ($left($3,1) == $chr(35)) { join $3 | set $+(%,req,$3) $nick }
}
[color:blue] [/color]
raw 366:*: {
[color:blue]if ($+(!%,req,$2)) halt[/color]
[color:red]if ($eval($+(%,req,$2),2) !isop $2) {
.msg $eval($+(%,req,$2),2) Request failed. You are not opped on channel $2 try again when you have op.
.part $2
}[/color]
elseif ($nick($2,0) < 5) {
.msg $eval($+(%,req,$2),2) Request failed. You do not have the required amount of users in channel.
.part $2
}
else .msg $eval($+(%,req,$2),2) Your channel meets the requirements and I will stay. Remember give me op or else my commands wont work.
unset $+(%,req,$2)
}
The blue line is added to my original code to prevent the raw event from triggering if you do a /hop or manual /join or any other kind of join that was not triggered by the script. This could still malfunction if you do a join or hop while the script is processing the !request command by a user, but odds of that happening are kinda astronomical.
The part in red is added to check if the requester is an op in the channel.