mIRC Home    About    Download    Register    News    Help

Print Thread
#113260 03/03/05 12:27 AM
Joined: Feb 2005
Posts: 193
A
Vogon poet
OP Offline
Vogon poet
A
Joined: Feb 2005
Posts: 193
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!

#113261 03/03/05 12:32 AM
Joined: Nov 2003
Posts: 2,321
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,321
It's not possible for them to be an owner when they join a channel.

#113262 03/03/05 12:45 AM
Joined: Feb 2005
Posts: 193
A
Vogon poet
OP Offline
Vogon poet
A
Joined: Feb 2005
Posts: 193
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?

#113263 03/03/05 12:55 AM
Joined: Nov 2003
Posts: 2,321
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,321
You should run a timer when they join and check if ($nick !isowner $chan) then.

#113264 03/03/05 01:08 AM
Joined: Feb 2005
Posts: 193
A
Vogon poet
OP Offline
Vogon poet
A
Joined: Feb 2005
Posts: 193
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?

#113265 03/03/05 01:24 AM
I
Iori
Iori
I
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) } }

Last edited by Iori; 03/03/05 01:26 AM.
#113266 03/03/05 02:01 AM
Joined: Feb 2005
Posts: 193
A
Vogon poet
OP Offline
Vogon poet
A
Joined: Feb 2005
Posts: 193
Thanks tidy and Iori! Script works perfect!


Link Copied to Clipboard