mIRC Home    About    Download    Register    News    Help

Topic Options
#190473 - 21/11/07 01:22 PM away raws
Buggs2008 Offline
Fjord artisan

Registered: 16/10/07
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
}


Edited by Buggs2008 (21/11/07 01:24 PM)

Top
#190481 - 21/11/07 02:53 PM Re: away raws [Re: Buggs2008]
Trashlord_ Offline
Babel fish

Registered: 26/10/07
Posts: 51
Loc: Israel
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).

Top
#190483 - 21/11/07 03:11 PM Re: away raws [Re: Buggs2008]
Buggs2008 Offline
Fjord artisan

Registered: 16/10/07
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

Top
#190488 - 21/11/07 04:00 PM Re: away raws [Re: Buggs2008]
RoCk Offline
Hoopy frood

Registered: 16/12/02
Posts: 2009

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
}


Top