mIRC Home    About    Download    Register    News    Help

Print Thread
#80017 20/04/04 10:16 PM
Joined: Apr 2004
Posts: 27
P
parvez Offline OP
Ameglian cow
OP Offline
Ameglian cow
P
Joined: Apr 2004
Posts: 27
how can i anti idle?
using a small code??? and when i type !lag.stat in main, it should say LAG STAT [ server name ] [ my ping time ] thats all i need and i really need it! PLEASE frown

Joined: Mar 2003
Posts: 1,271
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,271
Just as long as you don't expect this to prevent ping timeouts, as it won't. Furthermore be aware that many channels do not allow anti-dile scripts to be used.

As for the code: use the on INPUT event to detect what you type, ping your server, wait for the ping reply and then echo it to yourself (no one in the channel cares, so don't send it to the channel...)


DALnet #Helpdesk
I hear and I forget. I see and I remember. I do and I understand. -Confucius
Joined: Feb 2004
Posts: 206
D
Fjord artisan
Offline
Fjord artisan
D
Joined: Feb 2004
Posts: 206
I use the following combination:

In the "Perform" section I have:
/timerAlive 0 500 //mytime

While the alias "mytime" is:
/mytime /msg $me This is to stay alive at $time

(OK, I scripted it a long time ago and could be done in one line in the Perform section:
/timerAlive 0 500 /msg $me This is to stay alive at $!time
)

/msg could be replaced with /notice if you so desire.

The function of this is to perform a regular action over your comms link (some ISPs have a 20 minute idle timeout), and to let the chat server know that you are still "alive", not just some ghost that hasn't communicated for a long time. Some chat servers Ihave used had this problem.

Simple, small andeffective.

Oh, and the $time at the end is just so you can tell one message from another after a long period!

Cheers,

DK


Darwin_Koala

Junior Brat, In-no-cent(r)(tm) and original source of DK-itis!
Joined: Feb 2004
Posts: 206
D
Fjord artisan
Offline
Fjord artisan
D
Joined: Feb 2004
Posts: 206
My first reply provided an "anti-idle" method. To customisse a lag counter, I use the following in my alias:
/myping /notice $me !myping $ticks

and the following in my remotes:
on 1:NOTICE:!myping*:*:/echo -a The delay is $calc( ($ticks - $2)/1000 ) seconds

(Again, scripted a long time ago - these days I woudl place both together in a script file.)

To build on my previous reply, the following would be put in the Perform:

/timerAlive 0 500 /notice $me !myping $!ticks

and the Remotes reaction would be:
on 1:NOTICE:!myping*:*:/echo -a LAG STAT: $server $calc( ($ticks - $2)/1000 ) seconds

I hope that helps - and I wonder if there are a few different ways of achieving the same thing?

Cheers,

DK






Darwin_Koala

Junior Brat, In-no-cent(r)(tm) and original source of DK-itis!
Joined: Aug 2003
Posts: 325
W
Fjord artisan
Offline
Fjord artisan
W
Joined: Aug 2003
Posts: 325
I use somethin similar to ping using CTCP...
Have an alias that will CTCP myself with a $ticks count, then a CTCP catcher that will grab it, do the calculation and that's the time. I've noticed that even though it's not supposed to prevent ping timeouts, they happen somewhat less while I have it running, and also, during the times that I do ping out, my connection gets restore more quickly. I've grown addicted to having it running, because then I can glance through and have an idea to my 'ping' times, and when it goes up, either an impending netsplit is about to happen, or a DDOS/DOS is happening.

grin

Joined: Jun 2003
Posts: 77
O
Babel fish
Offline
Babel fish
O
Joined: Jun 2003
Posts: 77
I wrote a small script for some purpose, but I can't actually remember what it was now. But when I was using it, I found it is very effective in avoiding ping timeouts. So, I just kept it and renamed it Anti-ping timeout.

Basically what it does is sends a private message to myself every 5 minutes. Whats great about it is that it runs completely in the background, so i don't get a private message window popping up all the time. I have just made a timer which sends me a message every half an hour saying it's still active. I tested it for 3 days constantly connected to a server. Only once did it ping timeout while the script was running and that was only because my ISP was down for maintenance or something. Tested it without the script and within 20mins it had timed out. So it obviously works at least to some extent. smile


.

Link Copied to Clipboard