mIRC Homepage
Posted By: pouncer weird on part problem - 19/09/06 06:59 PM
echo -a $nick(#, 0) echos 15

john leaves

on *:PART:#: echo -a $nick(#, 0)
still echos 15 (?? should be 14)

but when i do echo -a $nick(#, 0) manually, then it echos 14
Posted By: Scorpwanna Re: weird on part problem - 19/09/06 07:04 PM
I'd say give:

on *:PART:#: echo -a $calc($nick(#, 0) -1)

a shot.

or

Code:
on *:PART:#: timer 1 0 parted #
alias parted { echo -a $nick($1,0) }
Posted By: hixxy Re: weird on part problem - 19/09/06 07:13 PM
$nick() isn't updated until after the on part event.
Posted By: pouncer Re: weird on part problem - 19/09/06 07:32 PM
so is this a mirc bug?
Posted By: Scorpwanna Re: weird on part problem - 19/09/06 07:38 PM
No.
Posted By: hixxy Re: weird on part problem - 19/09/06 07:43 PM
It's intended, not a bug.
Posted By: pouncer Re: weird on part problem - 19/09/06 08:51 PM
hmm. this is kinda screwed cos its for a stats alias

im trying to show

total users
owners
hosts
participants

and when a user parts i can change total users by
$calc($nick(#, 0) - 1) as scorp said, but what if that user was a host or a owner or just participant, its messed up
Posted By: hixxy Re: weird on part problem - 19/09/06 09:05 PM
Code:
on !*:part:#:{
  var %owners = $calc($nick($chan,0,q) $iif($nick isowner $chan,- 1)), $&
    %ops = $calc($nick($chan,0,o) $iif($nick isop $chan,- 1)), $&
    %voices = $calc($nick($chan,0,v) $iif($nick isvoice $chan,- 1)), $&
    %regs = $calc($nick($chan,0,r) $iif($nick isreg $chan,- 1)), %all = $calc($nick($chan,0) - 1)
}
Posted By: pouncer Re: weird on part problem - 19/09/06 09:39 PM
thanks ill play around with that!
Posted By: MikeChat Re: weird on part problem - 19/09/06 10:46 PM
I think your timer idea was ok, just fired too fast (you had 0)

on *:PART:#: timer 1 1 parted #

alias parted { echo -a $nick($1,0) }


you can try speeding that up with a millisecond timer

on *:PART:#: timer -m 1 500 parted #
Posted By: Scorpwanna Re: weird on part problem - 19/09/06 11:16 PM
yeah, 0 worked on the server i was testing it on frown. But yeah milsec is best.
Posted By: pouncer Re: weird on part problem - 22/09/06 07:25 PM
i just wanted to, with this on part problem

would on*quit have the same problem?
Posted By: hixxy Re: weird on part problem - 22/09/06 07:30 PM
Try it.
© mIRC Discussion Forums