mIRC Homepage
Posted By: Buggs2008 away raws - 21/11/07 01:22 PM
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
}
Posted By: Trashlord_ Re: away raws - 21/11/07 02:53 PM
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).
Posted By: Buggs2008 Re: away raws - 21/11/07 03:11 PM
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
Posted By: RoCk Re: away raws - 21/11/07 04:00 PM

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
}

© mIRC Discussion Forums