mIRC Home    About    Download    Register    News    Help

Print Thread
weird on part problem #159734 19/09/06 06:59 PM
Joined: Oct 2005
Posts: 827
P
pouncer Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: Oct 2005
Posts: 827
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

Re: weird on part problem #159735 19/09/06 07:04 PM
Joined: Sep 2003
Posts: 261
S
Scorpwanna Offline
Fjord artisan
Offline
Fjord artisan
S
Joined: Sep 2003
Posts: 261
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) }

Re: weird on part problem #159736 19/09/06 07:13 PM
Joined: Sep 2005
Posts: 2,881
H
hixxy Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
$nick() isn't updated until after the on part event.

Re: weird on part problem #159737 19/09/06 07:32 PM
Joined: Oct 2005
Posts: 827
P
pouncer Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: Oct 2005
Posts: 827
so is this a mirc bug?

Re: weird on part problem #159738 19/09/06 07:38 PM
Joined: Sep 2003
Posts: 261
S
Scorpwanna Offline
Fjord artisan
Offline
Fjord artisan
S
Joined: Sep 2003
Posts: 261
No.

Re: weird on part problem #159739 19/09/06 07:43 PM
Joined: Sep 2005
Posts: 2,881
H
hixxy Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
It's intended, not a bug.

Re: weird on part problem #159740 19/09/06 08:51 PM
Joined: Oct 2005
Posts: 827
P
pouncer Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: Oct 2005
Posts: 827
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

Re: weird on part problem #159741 19/09/06 09:05 PM
Joined: Sep 2005
Posts: 2,881
H
hixxy Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
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)
}

Re: weird on part problem #159742 19/09/06 09:39 PM
Joined: Oct 2005
Posts: 827
P
pouncer Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: Oct 2005
Posts: 827
thanks ill play around with that!

Re: weird on part problem #159743 19/09/06 10:46 PM
Joined: Dec 2002
Posts: 1,245
M
MikeChat Offline
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
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 #

Re: weird on part problem #159744 19/09/06 11:16 PM
Joined: Sep 2003
Posts: 261
S
Scorpwanna Offline
Fjord artisan
Offline
Fjord artisan
S
Joined: Sep 2003
Posts: 261
yeah, 0 worked on the server i was testing it on frown. But yeah milsec is best.

Re: weird on part problem #159745 22/09/06 07:25 PM
Joined: Oct 2005
Posts: 827
P
pouncer Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: Oct 2005
Posts: 827
i just wanted to, with this on part problem

would on*quit have the same problem?

Re: weird on part problem #159746 22/09/06 07:30 PM
Joined: Sep 2005
Posts: 2,881
H
hixxy Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Try it.