mIRC Home    About    Download    Register    News    Help

Print Thread
#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

#159735 19/09/06 07:04 PM
Joined: Sep 2003
Posts: 261
S
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) }

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

#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?

#159738 19/09/06 07:38 PM
Joined: Sep 2003
Posts: 261
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Sep 2003
Posts: 261
No.

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

#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

#159741 19/09/06 09:05 PM
Joined: Sep 2005
Posts: 2,881
H
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)
}

#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!

#159743 19/09/06 10:46 PM
Joined: Dec 2002
Posts: 1,245
M
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 #

#159744 19/09/06 11:16 PM
Joined: Sep 2003
Posts: 261
S
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.

#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?

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


Link Copied to Clipboard