mIRC Homepage
Posted By: piko raw 317 - 28/10/03 01:29 PM
Code:
 
raw 317:*: {
  echo -at signed on: $duration($4)
  halt
} 


why doesnt this work like it should?
isn't $4 counted in secondes since the user connects to the server?
Posted By: bunar Re: raw 317 - 28/10/03 01:42 PM
put this in remote:

raw 317:*: var %tempe = $time($4),rs,r,ins,in,ecs,ec | var %onl = $time($calc($ctime - $4)) | .echo -s $theme(raw317,%tempe,$date($4),%onl,$duration($3))

put this in alias:

:raw317 | return Idle: $5- Sign on: $2 - $3 On-line: $4
Posted By: LocutusofBorg Re: raw 317 - 28/10/03 03:02 PM
I have no idea where you came up with that code, but it's complete bullocks.

$time($4),rs,r,ins,in,ecs,ec
what's that stuff after the $time() ?
$theme
there is no identifier like that in mIRC. Maybe your script has it, but that doesn't mean other people do.
:raw317 | return Idle: $5- Sign on: $2 - $3 On-line: $4
Would appreciate it if someone would explain if it's me or something else - far as I have seen, this doesn't even come close to how an alias is created in aliases.

To the original poster: the parameter $4 is the signon time, so $asctime($4) will display the time the user connected. $calc($ctime - $4) is the number of seconds he has been connected, $duration($calc($ctime - $4)) is the time he's been connected in hr-minute-second format.
Posted By: theRat Re: raw 317 - 28/10/03 03:03 PM
Code:
raw 317:*: {
  echo -at signed on: $asctime($4) = $duration($calc($ctime - $4)) ago
  halt
} 
Posted By: bunar Re: raw 317 - 28/10/03 11:12 PM
it works perfect to me mr locustus of borg
Posted By: Collective Re: raw 317 - 29/10/03 01:13 AM
Whether or not it works for you doesn't really matter, the goal is to make something work for Piko.

You have a $theme alias. Piko probably doesn't. Even if he does does, it may well be a different one.

That alias you have given is probably meant to be a label. You can't put labels in any odd place, they have to be inside an event/alias/etc.
Posted By: LocutusofBorg Re: raw 317 - 29/10/03 06:24 AM
Read up on all the discussions we have had with pheonix on how useful a specific piece of code that works on only one computer with a specific script running is to someone else...
Posted By: bunar Re: raw 317 - 29/10/03 01:06 PM
ok i apologyse but you can from thet code also see what wildcard needs to be used
Posted By: piko Re: raw 317 - 30/10/03 02:17 PM
just one more question..

: idle:              17hrs 4mins 2secs
: signed on:    16hrs 57mins ago

how is this possible? ;P

Code:
raw 317:*: {
  echo $color(whois) -a : idle: $duration($3,1)
  echo $color(whois) -a : signed on: $duration($calc($ctime - $4),2) ago
}
Posted By: LocutusofBorg Re: raw 317 - 30/10/03 04:39 PM
Fluke ?
Posted By: KingTomato Re: raw 317 - 30/10/03 09:15 PM
Since you're comparing it to your ctime, Im guessing the server's clock is set differently.
© mIRC Discussion Forums