mIRC Home    About    Download    Register    News    Help

Print Thread
test server #232335 30/05/11 06:34 PM
Joined: Nov 2005
Posts: 26
D
dutch1918 Offline OP
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Nov 2005
Posts: 26
I'm looking to make a script that will test to see if a server is active and if not do /server -m <network>

Re: test server [Re: dutch1918] #232341 30/05/11 11:52 PM
Joined: Jan 2007
Posts: 1,156
D
DJ_Sol Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
Ok, so what do you have so far?

/help /scid
/help /scon

Re: test server [Re: dutch1918] #232351 31/05/11 02:01 PM
Joined: Nov 2005
Posts: 26
D
dutch1918 Offline OP
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Nov 2005
Posts: 26
othernet {
if ($scon() = othernet) end
server -m othernet
end
}

I'm not very good with these scripts and need hand holding

Last edited by dutch1918; 31/05/11 02:02 PM.
Re: test server [Re: dutch1918] #232353 31/05/11 02:27 PM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
I've written this to be placed in the Remotes section, not Aliases. If you want to put it in Aliases, remove the word alias from the first line.
Code:
alias othernet {
  .scon -at1 checknet othernet
  if %othernet {
    .server -m othernet
  }
}
alias -l checknet {
  if $network == $1 {
    set %othernet $false
  }
  return
}

Of course, the actual details will vary and you'll have to put in the correct details in the various locations.

Re: test server [Re: dutch1918] #232354 31/05/11 03:45 PM
Joined: Sep 2005
Posts: 2,881
H
hixxy Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Code:
alias newnet { 
  scid -at1 if ($network == $1) return
  server -m $1
}


/newnet othernet

Re: test server [Re: hixxy] #232355 31/05/11 04:21 PM
Joined: Nov 2005
Posts: 26
D
dutch1918 Offline OP
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Nov 2005
Posts: 26
Thanks hixxy.. that one worked for me

Last edited by dutch1918; 31/05/11 04:22 PM.