mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Dec 2002
Posts: 51
D
Dingo Offline OP
Babel fish
OP Offline
Babel fish
D
Joined: Dec 2002
Posts: 51
here are 4 lines of code. i have 4 variables which i need to put inplace of the level


Code:
 
I need %CL where +4: is
on +4:JOIN:#:cline  {  3 $chan $nick | echo  3 $chan 0,3<CAUTION>  < $+ $nick $+ > has joined the channel  }

-

i need %FL where +5: is
on +5:JOIN:#:cline  {  4 $chan $nick | echo  4 $chan 0,4<Friend> < $+ $nick $+ > has joined $chan  }

-

I need %VL where +8: is
on +8:JOIN:#:cline  {  6 $chan $nick | echo 6 $chan 0,6<Voice> < $+ $nick $+ > has joined $chan  }

-

and %OL where 10 is
on +10:JOIN:#:cline { 12 $chan $nick | echo 12 $chan 0,12<Op> < $+ $nick $+ > has joined $chan  }
 

can this be done?

Joined: Dec 2002
Posts: 86
D
Babel fish
Offline
Babel fish
D
Joined: Dec 2002
Posts: 86
Not exactly.

You could use named userlevels, called cl, fl, vl, and ol if you like. Then you could do:

Code:
on +cl:JOIN:#:
on +fl:JOIN:#:
on +vl:JOIN:#:
on +ol:JOIN:#:


Of course if you don't want to use named levels, you could just do a catch-all on *:JOIN:#: and from within there just check $clevel

HTH,
-chris

Joined: Dec 2002
Posts: 51
D
Dingo Offline OP
Babel fish
OP Offline
Babel fish
D
Joined: Dec 2002
Posts: 51
i can't use named levels becausei have a dialog where i enter the user level for ops, voices, friends, and caution nicks...

anyway i got this peice of code to work - maybe there's a better way of doing this?

Code:

on *:JOIN:#:{ 
  if ( $level($address($nick,1)) == %OL )  {
    cline 12 $chan $nick 
    echo 12 $chan 0,12<Op> < $+ $nick $+ > has joined $chan  
  }
  if ( $level($address($nick,1)) == %VL )  {
    cline 6 $chan $nick
    echo 6 $chan 0,6<Voice> < $+ $nick $+ > has joined $chan  
  }
  if ( $level($address($nick,1)) == %FL )  {
    cline 4 $chan $nick 
    echo  4 $chan 0,4<Friend> < $+ $nick $+ > has joined $chan  
  }
  if ( $level($address($nick,1)) == %CL )  {
    cline 3 $chan $nick 
    echo  3 $chan 0,3<CAUTION>  < $+ $nick $+ > has joined the channel  
  }
}


Joined: Dec 2002
Posts: 417
O
Fjord artisan
Offline
Fjord artisan
O
Joined: Dec 2002
Posts: 417
cline only works if you are changing the color of a line in a custom window. I suggest to change the cline to aline so when they join the channel it will add there nick to the corresponding color which has been designated. Also when using cline or aline you need to designate a custom windows to direct the information to fall in. Try this code to see if it is what you wanted.

Code:
on *:join:#: {
  if ($window(@Join) == $null) { //window -el @Join }
  if ($level($nick) == %CL) { aline 3 @Join $chan $nick | echo  3 $chan 0,3<CAUTION>  < $+ $nick $+ > has joined the channel  }
  if ($level($nick) == %FL) { aline 4 @Join $chan $nick | echo  4 $chan 0,4<Friend> < $+ $nick $+ > has joined $chan  }
  if ($level($nick) == %VL) { aline 6 @Join $chan $nick | echo 6 $chan 0,6<Voice> < $+ $nick $+ > has joined $chan  }
  if ($level($nick) == %OL) { aline 12 @Join $chan $nick | echo 12 $chan 0,12<Op> < $+ $nick $+ > has joined $chan  } 
} 

  




Intelligence: It's better to ask a stupid question, then to prove it by not asking....

Link Copied to Clipboard