mIRC Home    About    Download    Register    News    Help

Print Thread
return idle #121971 04/06/05 03:28 PM
Joined: Nov 2003
Posts: 67
C
Canario Offline OP
Babel fish
OP Offline
Babel fish
C
Joined: Nov 2003
Posts: 67
I try to check my own idle, but $idle returns 0 every time.
There are some way to check the idle without /whois?


irc.universochat.net
#escripting
Re: return idle #121972 04/06/05 03:58 PM
Joined: Apr 2005
Posts: 18
B
BarGarth Offline
Pikka bird
Offline
Pikka bird
B
Joined: Apr 2005
Posts: 18
Code:
 //echo $duration($nick(#,$me).idle) 

Re: return idle #121973 04/06/05 04:21 PM
Joined: Sep 2003
Posts: 4,230
D
DaveC Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
$idle returns the number of seconds you have been idle in mirc for, so its always zero if you do a command to see what it is, becuase you just did a command.
try typing in /TIMER 60 1 echo -st $!idle is $idle

you well see it count up once a second, when its around 10 type something then press enter
it well reset to zero

Re: return idle #121974 04/06/05 04:27 PM
Joined: Apr 2005
Posts: 18
B
BarGarth Offline
Pikka bird
Offline
Pikka bird
B
Joined: Apr 2005
Posts: 18
Quote:
$idle returns the number of seconds you have been idle in mirc for, so its always zero if you do a command to see what it is, becuase you just did a command.


thats incorrect;

it shows your idle time in that channel; echo doesn't send anything to the server so it doesn't count.

Tested here and works quite well.

edit:
even if what you suggested would be true, activating the timer would also be a command; and the result would still be 0


Last edited by BarGarth; 04/06/05 04:31 PM.
Re: return idle #121975 04/06/05 04:31 PM
Joined: Feb 2005
Posts: 681
M
mIRCManiac Offline
Fjord artisan
Offline
Fjord artisan
M
Joined: Feb 2005
Posts: 681
It's correct, even if you do an echo from the command line,
which sends nothing to the server, $idle gets reset to 0

Last edited by mIRCManiac; 04/06/05 04:31 PM.
Re: return idle #121976 04/06/05 04:35 PM
Joined: Apr 2005
Posts: 18
B
BarGarth Offline
Pikka bird
Offline
Pikka bird
B
Joined: Apr 2005
Posts: 18
perhaps its different when you use a irc or ircX server

i only work on a ircX server;

and there mIRC resets the $idle only when i send a commando to the server.

Other explanation i cannot give if it doesn't work by you guys.

Re: return idle #121977 04/06/05 08:07 PM
Joined: Jan 2005
Posts: 187
Brax Offline
Vogon poet
Offline
Vogon poet
Joined: Jan 2005
Posts: 187
Code:
menu * {
  Idle $duration($idle):halt
}  


No commands sent thisway...

or type $duration($idle) and press TAB key :tongue:


echo -a $signature
Re: return idle #121978 05/06/05 02:17 AM
Joined: Sep 2003
Posts: 4,230
D
DaveC Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Quote:
thats incorrect;


LOL, ummm thats incorrect

/me sees the comming "is not, is too, is not, is too"

Quote:
Tested here and works quite well.

I would guess that when you tested that you saw the results that matched your case becuase the last time you typed in and pressed enter was in that channel, so the $idle was the same as the channel idle. Try it again but change to the status window and enter a command, then return to the channel and check the idle again.

Quote:
even if what you suggested would be true, activating the timer would also be a command; and the result would still be 0

Since the timer goes off 60 times over a 1 minute period, the $idle value gets evalated each time as it goes off, not at the time the timer is created (note the single / in the command)
Sometimes the first timer event well trip before the $idle value increments to 1 sometimes it doesnt, so you can end up with the first event being 0 or 1 but each following one well be +1 unless of course you type in something (and press enter)

Re: return idle #121979 05/06/05 03:47 PM
Joined: Nov 2003
Posts: 2,327
T
tidy_trax Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
DaveC is correct.
$idle doesn't depend on a server at all so it makes no difference whether you use ircx, irc, ircu or anything else.
$idle is reset every time you press enter and there is something in an editbox, to test this theory you can use this:

Code:
on *:keydown:@idle:*: echo -a $idle


Now type /window -e @idle and type away. Have fun.


New username: hixxy
Re: return idle #121980 05/06/05 07:38 PM
Joined: Apr 2005
Posts: 18
B
BarGarth Offline
Pikka bird
Offline
Pikka bird
B
Joined: Apr 2005
Posts: 18
You're correct with the $dile identifier
It replies 0 with every command you give.

But then again

i used the idle property of $nick(#,nick)

which,( the command given in the channel), returns the idle time of that person in that specific channel;
since that nick can also be yourself, my testing results show me my own idle time in that specific channel


Quote Help:
'The idle property returns the time the user has been idle on the specified channel, ie. the time since the user last sent a message to the channel.'