mIRC Home    About    Download    Register    News    Help

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


"God sometimes puts us in the dark for us to see the light"
Re: onjoin owner #113261 03/03/05 12:32 AM
Joined: Nov 2003
Posts: 2,327
T
tidy_trax Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
It's not possible for them to be an owner when they join a channel.


New username: hixxy
Re: onjoin owner #113262 03/03/05 12:45 AM
Joined: Feb 2005
Posts: 194
A
alhammer Offline OP
Vogon poet
OP Offline
Vogon poet
A
Joined: Feb 2005
Posts: 194
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?


"God sometimes puts us in the dark for us to see the light"
Re: onjoin owner #113263 03/03/05 12:55 AM
Joined: Nov 2003
Posts: 2,327
T
tidy_trax Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
You should run a timer when they join and check if ($nick !isowner $chan) then.


New username: hixxy
Re: onjoin owner #113264 03/03/05 01:08 AM
Joined: Feb 2005
Posts: 194
A
alhammer Offline OP
Vogon poet
OP Offline
Vogon poet
A
Joined: Feb 2005
Posts: 194
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?


"God sometimes puts us in the dark for us to see the light"
Re: onjoin owner #113265 03/03/05 01:24 AM
Joined: Aug 2003
Posts: 1,831
I
Iori Offline
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
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.
Re: onjoin owner #113266 03/03/05 02:01 AM
Joined: Feb 2005
Posts: 194
A
alhammer Offline OP
Vogon poet
OP Offline
Vogon poet
A
Joined: Feb 2005
Posts: 194
Thanks tidy and Iori! Script works perfect!


"God sometimes puts us in the dark for us to see the light"