mIRC Home    About    Download    Register    News    Help

Print Thread
#58126 28/10/03 01:29 PM
Joined: Dec 2002
Posts: 45
P
piko Offline OP
Ameglian cow
OP Offline
Ameglian cow
P
Joined: Dec 2002
Posts: 45
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?

#58127 28/10/03 01:42 PM
Joined: Sep 2003
Posts: 584
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Sep 2003
Posts: 584
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

Last edited by bunar; 28/10/03 01:44 PM.
#58128 28/10/03 03:02 PM
Joined: Mar 2003
Posts: 1,271
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,271
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.


DALnet #Helpdesk
I hear and I forget. I see and I remember. I do and I understand. -Confucius
#58129 28/10/03 03:03 PM
Joined: Dec 2002
Posts: 774
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 774
Code:
raw 317:*: {
  echo -at signed on: $asctime($4) = $duration($calc($ctime - $4)) ago
  halt
} 


Code:
//if ( khaled isgod ) echo yes | else echo no
#58130 28/10/03 11:12 PM
Joined: Sep 2003
Posts: 584
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Sep 2003
Posts: 584
it works perfect to me mr locustus of borg

#58131 29/10/03 01:13 AM
Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
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.

#58132 29/10/03 06:24 AM
Joined: Mar 2003
Posts: 1,271
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,271
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...


DALnet #Helpdesk
I hear and I forget. I see and I remember. I do and I understand. -Confucius
#58133 29/10/03 01:06 PM
Joined: Sep 2003
Posts: 584
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Sep 2003
Posts: 584
ok i apologyse but you can from thet code also see what wildcard needs to be used

#58134 30/10/03 02:17 PM
Joined: Dec 2002
Posts: 45
P
piko Offline OP
Ameglian cow
OP Offline
Ameglian cow
P
Joined: Dec 2002
Posts: 45
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
}

#58135 30/10/03 04:39 PM
Joined: Mar 2003
Posts: 1,271
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,271
Fluke ?


DALnet #Helpdesk
I hear and I forget. I see and I remember. I do and I understand. -Confucius
#58136 30/10/03 09:15 PM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
Since you're comparing it to your ctime, Im guessing the server's clock is set differently.


-KingTomato

Link Copied to Clipboard