mIRC Home    About    Download    Register    News    Help

Print Thread
away raws #190473 21/11/07 01:22 PM
Joined: Oct 2007
Posts: 214
B
Buggs2008 Offline OP
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Oct 2007
Posts: 214
I like these two raws, exept I have one problem with them and that is when it is triggered, it only grays me out on the first channel I am on. When I do /away $chan is it possible to get this alias to gray [me] and [nick] out on the channel that I or they did the /away on?

raw 822:*: {
echo $color(other) -ti2 $comchan($nick,1) $nick Has been marked as being away: $2-
cline -l $color(other) $comchan($nick,1) $fline($comchan($nick,1),$nick,1,1)
haltdef
}

raw 821:*: {
echo $color(other) -ti2 $comchan($nick,1) $nick is no longer marked as being away.
cline -lr $comchan($nick,1) $fline($comchan($nick,1),$nick,1,1)
haltdef
}

Last edited by Buggs2008; 21/11/07 01:24 PM.
Re: away raws [Re: Buggs2008] #190481 21/11/07 02:53 PM
Joined: Oct 2007
Posts: 51
T
Trashlord_ Offline
Babel fish
Offline
Babel fish
T
Joined: Oct 2007
Posts: 51
Ok, first, $nick is invalid in raws, $nick is only valid in user-to-user or user-to-channel events.

It only grays you out on one channel, because you use $comchan($nick,1).

Instead, use a while loop, through $chan(0).

Re: away raws [Re: Buggs2008] #190483 21/11/07 03:11 PM
Joined: Oct 2007
Posts: 214
B
Buggs2008 Offline OP
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Oct 2007
Posts: 214
not quite sure how that would look,

but if I used a while loop wouldn't that trigger me grayed out on all channels that I am on?

I only wish to gray out the nickname that does the /away

Re: away raws [Re: Buggs2008] #190488 21/11/07 04:00 PM
Joined: Dec 2002
Posts: 2,025
R
RoCk Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,025

Which network are you on?

Try looping through $comchan...

Code:

raw 822:*: {
  var %i = 1
  while ($comchan($nick,%i)) {
    echo $color(other) -ti2 $v1  $nick Has been marked as being away: $2-
    cline -l $color(other) $v1 $fline($v1,$nick,1,1)
    inc %i
  }
  haltdef
}

raw 821:*: {
  var %i = 1
  while ($comchan($nick,%i)) {
    echo $color(other) -ti2 $v1  $nick is no longer marked as being away.
    cline -lr $v1 $fline($v1,$nick,1,1)
    inc %i
  }
  haltdef
}