mIRC Home    About    Download    Register    News    Help

Print Thread
$server().idle #202373 20/07/08 09:28 PM
Joined: Mar 2006
Posts: 393
T
The_JD Offline OP
Fjord artisan
OP Offline
Fjord artisan
T
Joined: Mar 2006
Posts: 393
$server.idle even

If there is one allready, forgive me...

Just thought it would compliment the new .idle properties.


[02:16] * Titanic has quit IRC (Excess Flood)
Re: $server().idle [Re: The_JD] #202374 20/07/08 09:31 PM
Joined: Dec 2002
Posts: 2,962
S
starbucks_mafia Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
Already there: $idle


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Re: $server().idle [Re: starbucks_mafia] #202377 20/07/08 09:42 PM
Joined: Mar 2006
Posts: 393
T
The_JD Offline OP
Fjord artisan
OP Offline
Fjord artisan
T
Joined: Mar 2006
Posts: 393
Thanks, I seen that... But what I meant was idle time since you recieved data... I guess mIRC would use something similar for the "PING :TIMEOUTCHECK".

Exactly the same as $chan(#).idle


.... $idle returns the seconds since you did something in mIRC (even an echo)

$chan(#name).idle returns the seconds since there was activity on the channel


[02:16] * Titanic has quit IRC (Excess Flood)
Re: $server().idle [Re: The_JD] #202384 21/07/08 12:01 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
While I didn't find an identifier for this, it is returned as $3 in raw 317, which, in turn, is generated by the /whois command.

Usage: /server.idle <nick>
Note: <nick> is optional and will default to your nick if not supplied.

Code:
alias server.idle {
  .enable #server.idle
  .whois $iif($1,$1,$me)
}
#server.idle off
raw 317:*:{
  echo -a $duration($3)
  halt
}
raw 318:*:{
  .disable #server.idle
  haltdef
}
#server.idle end

Re: $server().idle [Re: RusselB] #202385 21/07/08 12:06 AM
Joined: Mar 2006
Posts: 393
T
The_JD Offline OP
Fjord artisan
OP Offline
Fjord artisan
T
Joined: Mar 2006
Posts: 393
Not a bad idea, I like that one :P

BUT... I was referring to incoming and outgoing data from the socket... like the timeoutcheck would see... Not sure if I'm explaining it properly... Like time since last bytes sent/received.


[02:16] * Titanic has quit IRC (Excess Flood)
Re: $server().idle [Re: The_JD] #202386 21/07/08 12:49 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
I understand what you're asking for, and what I gave you is as close as I was able to come up with in the roughly 90 minutes since your original post.

Re: $server().idle [Re: RusselB] #202387 21/07/08 01:13 AM
Joined: Mar 2006
Posts: 393
T
The_JD Offline OP
Fjord artisan
OP Offline
Fjord artisan
T
Joined: Mar 2006
Posts: 393
Yeh, it's a shame that MY raw * dosnt work frown

....does anyone other than myself like this idea? eek

Last edited by The_JD; 21/07/08 01:17 AM.

[02:16] * Titanic has quit IRC (Excess Flood)
Re: $server().idle [Re: The_JD] #202390 21/07/08 03:11 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Quote:
Yeh, it's a shame that MY raw * dosnt work


It doesn't? To my knowledge raw numerics/events are returned by the network, so unless you have a script that disables these, and that script is loaded before the one I posted, my code should work fine.

If this is not the case, can you provide an sample of what you do get using the /whois command with the output being directed to a custom window via the /debug command.

Re: $server().idle [Re: RusselB] #202399 21/07/08 10:25 AM
Joined: Mar 2006
Posts: 393
T
The_JD Offline OP
Fjord artisan
OP Offline
Fjord artisan
T
Joined: Mar 2006
Posts: 393
Nah, I mean't raw "*" (raw anything)


[02:16] * Titanic has quit IRC (Excess Flood)
Re: $server().idle [Re: The_JD] #202408 21/07/08 01:37 PM
Joined: Jun 2003
Posts: 994
C
CtrlAltDel Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Jun 2003
Posts: 994
wouldn't that be
raw *:*:
to mean raw anything?


I refuse to engage in a battle of wits with an unarmed person. wink
Re: $server().idle [Re: CtrlAltDel] #202409 21/07/08 01:43 PM
Joined: Mar 2006
Posts: 393
T
The_JD Offline OP
Fjord artisan
OP Offline
Fjord artisan
T
Joined: Mar 2006
Posts: 393
Yeh...lol

Anyhow.. back to topic:

$server.idle would suit the rest of the new idle $prop's


[02:16] * Titanic has quit IRC (Excess Flood)
Re: $server().idle [Re: The_JD] #202417 21/07/08 09:58 PM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Sorry to keep this off track for a bit longer, but if your client isn't accepting raw numeric reports (which is what raw *:* returns (for lack of a better expression)), then how does your client handle things like the information returned using /whois ?

Getting back on track, I agree that this identifier would fit with the rest of the new .idle identifiers

Re: $server().idle [Re: RusselB] #202431 22/07/08 10:36 AM
Joined: Mar 2006
Posts: 393
T
The_JD Offline OP
Fjord artisan
OP Offline
Fjord artisan
T
Joined: Mar 2006
Posts: 393
raw *:*:{
echo -st $1-
}

My bad, I had used a ";" instead of ":"


[02:16] * Titanic has quit IRC (Excess Flood)
Re: $server().idle [Re: The_JD] #202462 23/07/08 12:00 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
that would explain why it didn't work previously, and still makes my suggestion valid.