mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Sep 2005
Posts: 20
Ameglian cow
OP Offline
Ameglian cow
Joined: Sep 2005
Posts: 20
In the adress book color options there is an option to color people with more than %x minutes idle.... I've tryed to make the option to work with people in my notify list.... and when i look at the debug windows i see this...
Quote:

-> eu.bgit.net ISON Sonne
<- :eu.bgit.net 303 YgId0rP :Sonne

the other lines are privmsg's in chans and pvts.... my question is how does mIRC get only the idle time of the user... and how can I get it without whois....
If mIRC use a whois to get the idle time the server 'll give back more information.... but it gives only the idle.... what command can i use to get only the idle???

Respect ! ! !

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
By halting the response from different raws that are reported when a whois is issued, one can control just what information is actually displayed or used for other purposes.

To my knowledge, and I may be incorrect, mIRC gets the idle time from the server, which is the same idle time that you would get using /whois

For more information about RAWS, check here

Joined: Sep 2005
Posts: 20
Ameglian cow
OP Offline
Ameglian cow
Joined: Sep 2005
Posts: 20
but... i think i cant make an aliase like
idle {
whois
on raw 311 halt e t c....
}
:\ and if i make it with events on raw... the whois wont work.... i've made a script with swiches..... if a variable is 1 whois if is 2 halt some raw e t c.... and there are some timers to change the variables.... but if u have more than 1 sec lag it wont work.... and in the network i'm chatting very often instead of whois i recive "server load is temporary too heavy" ....does anybody have an idea how can i make a working alias whick gets the idle time without printing whois....
I have an idea with halting all the raws and make a new alias for whois..... but it's too.... not heavy but too big script for doing nothing....

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
It's not really that big a script.
Here's one that works, with the possible exception of the section regarding heavy server load. I wasn't able to test this under conditions that would make the server come under a heavy load, but I believe that section should work also

Code:
menu nicklist {
  Network Idle: nidle $chan
}
alias nidle {
  var %a = 1
  while %a &lt;= $snick(%chan,0) {
    .enable #nidle
    .whois $snick(%chan,%a)
    inc %a
  }
}
on *:snotice:server load is * heavy {
  $+(.timeridle.,$snick(#,%a) 1 30 nidle %chan %nick
}
#nidle off
raw 301:*: halt 
raw 310:*: halt
raw 311:*: halt 
raw 312:*: halt 
raw 313:*: halt 
raw 330:*: halt 
raw 319:*: halt
raw 317:*: {
  echo -a $2 has been idle for $duration($3)
  halt
}
raw 318:*: .disable #nidle | haltdef 
#nidle end
  

Joined: Dec 2002
Posts: 349
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Dec 2002
Posts: 349
mIRC assumes the last time it saw a message on a channel from a user is their 'idle time' for that channel, in other words it tracks this itself without need for /whois. You can get the current idle by using $nick(<chan>,<N|name>).idle:

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.

Hope this helps smile

Joined: Sep 2005
Posts: 73
D
Babel fish
Offline
Babel fish
D
Joined: Sep 2005
Posts: 73
The $nick(#, nick).idle will return the idle time as mIRC has recorded it. Thus, the idle time returned by that function will not be the same as the idle time returned by the server if you had first joined a channel for example.

After an idle user becomes active, the mIRC idle time and the server idle time should match.

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
There are two idle times. The server idle time, which can be obtained from the server using /whois records a person's idle time for the server. This is the time since the server last saw a message from the user.

The channel idle time, obtainable by using $nick(<channel>,<nick>).idle shows the idle time for that person in that channel. It does not allow for messages sent via pm (/msg or /query) or for messages sent in other rooms/channels.

The channel idle time will be the same as, or greater than the server idle time.


Link Copied to Clipboard