mIRC Home    About    Download    Register    News    Help

Print Thread
#34798 07/07/03 08:23 PM
Joined: Feb 2003
Posts: 143
N
naki Offline OP
Vogon poet
OP Offline
Vogon poet
N
Joined: Feb 2003
Posts: 143
when I get this

!317 mynick whoisnick 128 1057598878 seconds idle, signon time

how to I convert that to the correct idle time?

#34799 07/07/03 08:29 PM
S
ScatMan
ScatMan
S
$3 = number of seconds u are idle, u can use $duration($3)
$4 = since when u are idle, u can use $asctime($4)

#34800 07/07/03 08:29 PM
Joined: Jan 2003
Posts: 2,973
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Jan 2003
Posts: 2,973
$asctime(long number)

#34801 07/07/03 08:29 PM
P
pheonix
pheonix
P
$duration($calc($4 / 1000))

#34802 07/07/03 08:33 PM
S
ScatMan
ScatMan
S
$4 is not the number of milliseconds, it's the date+time in CTIME format

#34803 07/07/03 08:40 PM
P
pheonix
pheonix
P
o ok blush

#34804 07/07/03 09:00 PM
Joined: Feb 2003
Posts: 143
N
naki Offline OP
Vogon poet
OP Offline
Vogon poet
N
Joined: Feb 2003
Posts: 143
kty

#34805 07/07/03 09:45 PM
Joined: Feb 2003
Posts: 143
N
naki Offline OP
Vogon poet
OP Offline
Vogon poet
N
Joined: Feb 2003
Posts: 143
who wont this work?

Code:
alias _whois_make {
  set %whois_get on 
  if ($2) { .whois $1 $2 }
  else { .whois $1 }
}

alias _whois_process {
  if (%whois_p == wserver_get) { set %whois_p idle | _whois_make $gettok(%whois_312,3,32) $gettok(%whois_311,2,32) } 
  if (%whois_p == idle) { return $duration($gettok(%whois_317,3,32)) }
}

alias _idle { set %whois_p wserver_get | _whois_make $1 }


raw 307:*: { if (%whois_get == on) { set %whois_ $+ $numeric $1- | halt } }
raw 308:*: { if (%whois_get == on) { set %whois_ $+ $numeric $1- | halt } }
raw 309:*: { if (%whois_get == on) { set %whois_ $+ $numeric $1- | halt } }
raw 310:*: { if (%whois_get == on) { set %whois_ $+ $numeric $1- | halt } }
raw 311:*: { if (%whois_get == on) { set %whois_ $+ $numeric $1- | halt } }
raw 312:*: { if (%whois_get == on) { set %whois_ $+ $numeric $1- | halt } }
raw 313:*: { if (%whois_get == on) { set %whois_ $+ $numeric $1- | halt } }
raw 314:*: { if (%whois_get == on) { set %whois_ $+ $numeric $1- | halt } }
raw 315:*: { if (%whois_get == on) { set %whois_ $+ $numeric $1- | halt } }
raw 316:*: { if (%whois_get == on) { set %whois_ $+ $numeric $1- | halt } }
raw 317:*: { if (%whois_get == on) { set %whois_ $+ $numeric $1- | halt } }
raw 318:*: { if (%whois_get == on) { set %whois_ $+ $numeric $1- | _whois_process | halt } }
raw 319:*: { if (%whois_get == on) { set %whois_ $+ $numeric $1- | halt } }
raw 378:*: { if (%whois_get == on) { set %whois_ $+ $numeric $1- | halt } }

#34806 07/07/03 09:58 PM
S
ScatMan
ScatMan
S
what do u have inside %whois_p ??

#34807 07/07/03 10:03 PM
Joined: Feb 2003
Posts: 143
N
naki Offline OP
Vogon poet
OP Offline
Vogon poet
N
Joined: Feb 2003
Posts: 143
idle

#34808 07/07/03 10:52 PM
S
ScatMan
ScatMan
S
u did /_whois_process inside the raw
and /return something
so u won't see anything, u can return it as an identifier and put it in a command, like: echo -a $_whois_process


#34809 07/07/03 10:54 PM
Joined: Feb 2003
Posts: 143
N
naki Offline OP
Vogon poet
OP Offline
Vogon poet
N
Joined: Feb 2003
Posts: 143
but I dont want it to echo... I want it to return so when I do $_idle(nick) it will give the users idle time

#34810 08/07/03 11:16 AM
S
ScatMan
ScatMan
S
that's impossible, identifier don't wait until u get a response from the server, identifier just doing the commands inside its alias and if it has a /return in the ALIAS it will return something if there is no it will return null



Link Copied to Clipboard