mIRC Home    About    Download    Register    News    Help

Print Thread
#49883 17/09/03 02:43 PM
Joined: Dec 2002
Posts: 343
D
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
D
Joined: Dec 2002
Posts: 343
$nick().joined to see how long a specific nick has been in a channel for since last joined.

#49884 17/09/03 02:59 PM
Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
that would be nice, but for now:
Code:
on *:JOIN:#:{
  hadd -m $chan $nick $ticks
}
on *:PART:#:{
  if ($nick == $me) { hfree $chan }
  else { hdel $chan $nick }
}
on *:QUIT:{
  var %i $comchan($nick,0)
  while (%i) {
    hdel $comchan($nick,%i) $nick
    dec %i
  }
}
on *:NICK:{
  var %i $comchan($newnick,0)
  while (%i) {
    hadd -m $comchan($newnick,%i) $newnick $hget($comchan($newnick,%i),$nick)
    hdel $comchan($newnick,%i) $nick
    dec %i
  }
}
alias joined {
  return $calc(($ticks - $hget($1,$2)) / 1000)
}

//echo -a $joined(<chan>,<nick>)


new username: tidy_trax
#49885 17/09/03 04:52 PM
Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
Well if the person was in the channel when you got there, mIRC has no way to get that information.

#49886 18/09/03 02:25 AM
Joined: Dec 2002
Posts: 343
D
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
D
Joined: Dec 2002
Posts: 343
Well, basically I want a way to tell when a window was created. $window(window name).ctime for creation time.

#49887 18/09/03 04:11 AM
Joined: Mar 2003
Posts: 1,271
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,271
I don't think such information is stored, and even if it is, your mIRC would have to request such information from each user in the channel, so you'd be stuck with something similar to doing a ctcp version on every user when you join a channel. The bigger the channel, the bigger the flood...


DALnet #Helpdesk
I hear and I forget. I see and I remember. I do and I understand. -Confucius
#49888 18/09/03 04:30 AM
Joined: Apr 2003
Posts: 426
Fjord artisan
Offline
Fjord artisan
Joined: Apr 2003
Posts: 426
Have you read about on OPEN?

I know it won't work for some cases, but when a window is opened, why not set a variable, or add it to a hash table?

ie, on *:OPEN:@:*: { if ($hget(windowopened) { .hadd windowopened $target opened at $time } }


--------
mIRC - fun for all the family (except grandma and grandpa)
#49889 18/09/03 12:04 PM
Joined: Dec 2002
Posts: 343
D
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
D
Joined: Dec 2002
Posts: 343
No, it would almost work like $nick(#,nickname).idle, but it would be different. If you join the channel, and everyone is there, everyone is essentially set to zero, and grows. When someone leaves and rejoins, it's reset to zero. It would be done for ON JOIN to reset it to zero.

But if that's not done, I would think it's time to add a built-in creation time for windows so $window(window).ctime.


Link Copied to Clipboard