mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Aug 2009
Posts: 9
K
kopji Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
K
Joined: Aug 2009
Posts: 9
Hello! I would like some help with creating a script that sends a chatline into a channel every 15 sec. Because I get disconnected alot, due to my isp I think this would help to actually disconnect me from the network so I can rejoin right away. Instead of being disconnected, when everything looks fine. To find out 10 minutes later that I've been disconnected the whole time, and thus not recieved any sent chat lines from other people.

So: Send chatline into #channel-x every x sec.

Joined: Dec 2008
Posts: 1,515
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
try using this:

Code:
ON *:CONNECT: { .timer[check_status] 0 15 msg #CHANNEL-X This is the sending text for every 15 seconds }


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
I'd recommend using
Code:
ON me:*:join:#channel-X
rather than
Code:
ON CONNECT
to ensure that you are able to send a message to the channel.
Also remember to turn the timer off if you leave the channel, or you could end up with a mess of "Can not send to #channel-X" messages in your status window.

Joined: Aug 2009
Posts: 9
K
kopji Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
K
Joined: Aug 2009
Posts: 9
Seems like it isn't working. I am supposed to put it in the under remote right (alt+r)?

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Yep.

Joined: Aug 2009
Posts: 9
K
kopji Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
K
Joined: Aug 2009
Posts: 9
Tried both versions now but it's not working. Any idea why?

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Are your remotes turned on? If you don't know, type /!remote on

If that doesn't resolve the problem, look at your status window to see if there's an error message.

Last edited by RusselB; 16/08/09 05:41 PM.
Joined: Aug 2009
Posts: 9
K
kopji Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
K
Joined: Aug 2009
Posts: 9
* Remote is on (Ctcps,Events,Raw)

No error messages in the status window.

Joined: Aug 2009
Posts: 9
K
kopji Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
K
Joined: Aug 2009
Posts: 9
Actually it works now! No idea what I did, more than restarting it (I had tried that before as well). Thanks guys! smile

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Could be you were just impatient. When a timer starts, the command on the timer (in this case the message) doesn't go out immediately, but after the specified delay (in this case, 15 seconds).

Joined: Jul 2008
Posts: 236
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Jul 2008
Posts: 236
Originally Posted By: RusselB
I'd recommend using
Code:
ON me:*:join:#channel-X
rather than
Code:
ON CONNECT
to ensure that you are able to send a message to the channel.
Also remember to turn the timer off if you leave the channel, or you could end up with a mess of "Can not send to #channel-X" messages in your status window.

What on Earth does that do?

Code:
on 1:CONNECT: { 
  ; use an online timer to send some raw junk
  ; this junk -should- get echoed back by the server pretty quickly
  .timer 0 5 raw NOOP
  .timerTIMEOUT 1 30 server
}

; numeric for the "unknown command" response
raw 421:*: {
  if ($2 == NOOP) {
    ; if we recieve the junk, reset the timeout timer so as long as the connection is healthy, it should never reconnect ;)
    .timerTIMEOUT 1 30 server
  }
}

enjoy smile


Link Copied to Clipboard