mIRC Homepage
Posted By: alhammer onjoin owner - 03/03/05 12:27 AM
Code:
on *:JOIN:#: {
  if ($ulevel = 1) {
    mode # +v $nick
  }
  elseif ($ulevel = 5) {
    mode # +o $nick
  }
  elseif ($ulevel = 10) {
    mode # +q $nick
  }
  elseif (($ulevel = 15) [color:blue]&& ($nick !isowner $chan))[/color]{
  mode # +q $nick | /access # add owner $address($nick,13)
}
}
Hey All. I'm having trouble with this command. Everything works great except the onjoin for a level 15 person. I want to grant owner access to a level 15 person. The script above will +q them, but it totally ignores the blue code. I only want it to +q level 15 people and give them owner access if they are NOT already owner when they come in. Iv'e tried using timers and different spacing, but no luck so far. Would someone please help me fix this! Thanks!
Posted By: tidy_trax Re: onjoin owner - 03/03/05 12:32 AM
It's not possible for them to be an owner when they join a channel.
Posted By: alhammer Re: onjoin owner - 03/03/05 12:45 AM
Well, the reason I want it to avoid making them an owner and Adding Owner Access is beacse if they already have owner access, they will be owner when they come in. So in that situation, I dont want it to +q or add owner access to them, because they are already owner. Get it?
Posted By: tidy_trax Re: onjoin owner - 03/03/05 12:55 AM
You should run a timer when they join and check if ($nick !isowner $chan) then.
Posted By: alhammer Re: onjoin owner - 03/03/05 01:08 AM
I tried a timer in front of the if such as: timer 1 2 if (blah). I tried a:
Code:
 on *:JOIN:#: {
  timer 1 2 { goto start }
  :start
  if ($ulevel = 1) {
    mode # +v $nick
  } 
Neither work. What am I doing wrong?
Posted By: Iori Re: onjoin owner - 03/03/05 01:24 AM
You can't use timers to /goto a label inside some code, set the timer to execute an alias instead. wink
Code:
on @*:join:#:{
  if ($ulevel == 1) { pvoice 2 # $nick }
  elseif ($ulevel == 5) { pop 2 # $nick }
  elseif ($ulevel == 10) { .timer 1 2 if (!$nick( # ,$nick,q)) mode # +q $nick }
  elseif ($ulevel == 15) { .timer 1 2 powner # $nick }
}
alias powner { if !$nick($1,$2,q) { mode $1 +q $2 | access $1 add owner $address($2,13) } }
Posted By: alhammer Re: onjoin owner - 03/03/05 02:01 AM
Thanks tidy and Iori! Script works perfect!
© mIRC Discussion Forums