mIRC Home    About    Download    Register    News    Help

Print Thread
#175225 19/04/07 06:29 AM
Joined: Apr 2007
Posts: 9
D
dvduh Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
D
Joined: Apr 2007
Posts: 9
Is there a pice of code that would allow me to reconnect every said time interval.


I have tried this

on *:connect {
timer.reconnect 0 500 disconnect
}

this disconnects me just fine, but i cant figure th ecode to reconnect me to the server.

dvduh #175230 19/04/07 11:58 AM
Joined: Dec 2002
Posts: 2,031
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,031
Code:
on *:connect: {
  .timer.reconnect 0 500 dodc
}
alias dodc {
  disconnect
  .timer 1 5 server $server $port
}


Last edited by RoCk; 19/04/07 12:00 PM.
RoCk #175253 19/04/07 07:32 PM
Joined: Apr 2007
Posts: 9
D
dvduh Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
D
Joined: Apr 2007
Posts: 9
i must be missing something here, this only disconnects me form the server

dvduh #175255 19/04/07 08:07 PM
Joined: Dec 2002
Posts: 2,031
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,031
* /server: invalid server number

You could've mentioned the error.

Code:
on *:connect: {
  .timer.reconnect 0 500 dodc
}
alias dodc {
  .timer -o 1 5 server $server $port
  disconnect
}

RoCk #175261 19/04/07 09:31 PM
Joined: Apr 2007
Posts: 9
D
dvduh Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
D
Joined: Apr 2007
Posts: 9
lol, i am dumb, i filed in the server and port variables manually and voila it worked. Now i have run into the issue of people sometimes joing my channel to fast and IRC tells me

"Target change to fast please wait X seconds"

Is there any ways around this?

dvduh #175262 19/04/07 10:31 PM
Joined: Apr 2007
Posts: 9
D
dvduh Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
D
Joined: Apr 2007
Posts: 9
what if i used this pause code,

Quote:
alias pause {
var %e = !echo $color(info) -a * /pause:
if ($version < 5.91) {
%e this snippet requires atleast mIRC version 5.91
}
elseif ($isid) {
%e this snippet can only be called as a command.
}
elseif (!$regex(pause,$1-,/^m?s \d+$/Si)) {
%e incorrect/insufficient parameters. Syntax: /pause <s|ms> <N>
}
elseif ($1 == ms) && ($os isincs 9598ME) {
%e cannot use milliseconds parameter on OS'es beneath Win2k
}
elseif ($2 !isnum 1-) {
%e must specify a number within range 1-
}
else {
var %wsh = $+(wsh,$ticks,$r(1111,9999)), %cmd
if ($1 == s) %cmd = ping.exe -n $int($calc($2 + 1)) 127.0.0.1
else %cmd = pathping.exe -n -w 1 -q 1 -h 1 -p $iif($2 > 40,$calc($2 - 40),$2) 127.0.0.1
.comopen %wsh wscript.shell
if ($comerr) %e unable to open Wscript.Shell
else .comclose %wsh $com(%wsh,run,1,bstr*,% $+ comspec% /c %cmd >nul,uint,0,bool,true)
}
}


would i just place that code in like this
Quote:
on *:connect: {

.timer.reconnect 0 60 dodc
}
alias dodc {
disconnect
.timer 1 60 server irc.gamesurge.net 6667
}

on *:join:#:{
if ($read(nicks.txt,w,$+($nick,!*))) return
write nicks.txt $+($nick,!)
pause s 3
msg $nick
}
alias pause {
var %e = !echo $color(info) -a * /pause:
if ($version < 5.91) {
%e this snippet requires atleast mIRC version 5.91
}
elseif ($isid) {
%e this snippet can only be called as a command.
}
elseif (!$regex(pause,$1-,/^m?s \d+$/Si)) {
%e incorrect/insufficient parameters. Syntax: /pause <s|ms> <N>
}
elseif ($1 == ms) && ($os isincs 9598ME) {
%e cannot use milliseconds parameter on OS'es beneath Win2k
}
elseif ($2 !isnum 1-) {
%e must specify a number within range 1-
}
else {
var %wsh = $+(wsh,$ticks,$r(1111,9999)), %cmd
if ($1 == s) %cmd = ping.exe -n $int($calc($2 + 1)) 127.0.0.1
else %cmd = pathping.exe -n -w 1 -q 1 -h 1 -p $iif($2 > 40,$calc($2 - 40),$2) 127.0.0.1
.comopen %wsh wscript.shell
if ($comerr) %e unable to open Wscript.Shell
else .comclose %wsh $com(%wsh,run,1,bstr*,% $+ comspec% /c %cmd >nul,uint,0,bool,true)
}
}


Link Copied to Clipboard