mIRC Home    About    Download    Register    News    Help

Print Thread
#135688 15/11/05 12:59 PM
Joined: Nov 2005
Posts: 6
D
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
D
Joined: Nov 2005
Posts: 6
Im trying to learn how to 'automate' a bnc login using mIRC. So when mIRC is started OR when the client is disconnected so it will reconnect through the bnc. Instead of having to type it all:

/server blah.blah.blah
/quote PASS blahblah
/vip blah.blah.com
/conn server.blah.net

Something like that. Is that possible?

Thanks!

#135689 15/11/05 01:15 PM
Joined: Apr 2005
Posts: 53
A
Babel fish
Offline
Babel fish
A
Joined: Apr 2005
Posts: 53
I used some timers, because bnc doesnt answer so quick...so do it like this:

On start to connect:
Code:
on *:start:{
  /server blah.blah.blah
  timerbnc1 1 3 /quote PASS blahblah
  timerbnc2 1 5 /vip blah.blah.com
  timerbnc3 1 6 /conn server.blah.net
}


The reconnect code is allmost the same:
Code:
on *:disconnect:{
  /server blah.blah.blah
  timerbnc1 1 3 /quote PASS blahblah
  timerbnc2 1 5 /vip blah.blah.com
  timerbnc31 1 6 /conn server.blah.net
}

#135690 15/11/05 01:22 PM
Joined: Nov 2005
Posts: 6
D
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
D
Joined: Nov 2005
Posts: 6
WoW! Thanks for the fast reply! Now to get REAL picky :P~~~ Is there a way to make this network specific? Or a sperate login for 2 different networks?

#135691 15/11/05 07:13 PM
Joined: Nov 2005
Posts: 6
D
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
D
Joined: Nov 2005
Posts: 6
Would these commands be entered in the 'Remote' area of my mIRC? And can they be listed on the same place or seperatly under 'Rempte'?

#135692 15/11/05 07:17 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Yes, they go in remotes. Make a new remote file (Alt-R > File > New) and place them there. Because they are two different events, they can be in the same file.


Invision Support
#Invision on irc.irchighway.net
#135693 15/11/05 07:41 PM
Joined: Aug 2005
Posts: 525
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Aug 2005
Posts: 525
Here's a much more efficient way of doing this, because by using timers it does not take into account that you may not be connected within the given amount of time that the commands execute after. Think lag.

The following will only execute the 'vip' and 'conn' commands once it has established a connection to the BNC.

Code:
on *:START:{ server [color:red]123.123.123.123[/color] [color:red]PORT[/color] [color:red]PASS[/color] }
on *:DISCONNECT:{ server [color:red]123.123.123.123[/color] [color:red]PORT[/color] [color:red]PASS[/color] }
on *:SNOTICE:Welcome to BNC [color:red]2.6.4[/color]*:{ quote vip [color:red]my.vhost.com[/color] | quote conn [color:red]irc.somewhere.com[/color] }


I'm pretty sure you're using this same type of BNC that I was using to test, so the on SNOTICE should have the same welcome message. If it doesn't then make changes as necessary.

The main thing to notice here is that you will need to change the version 2.6.4 to the version of you're bnc. I just loaded this version to do a quick test.

#135694 15/11/05 09:38 PM
Joined: Nov 2005
Posts: 6
D
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
D
Joined: Nov 2005
Posts: 6
COOL! Thank you all for responding. Ive got that in my 'remote' and it seems to work.......sorta, but heres the issue now. I try to connect to Undernet and Dalnet. I made a new 'remote' file that has the "on start" and "on disconnect" for Undernet and then a new seperate one that has the "on start" and "on disconnect" for Dalnet. The problem is it will only start up "one" instance. It always seems to be Dalnet. I dont know if thats due to me saving the file names as "bncdalnet" and "bncundernet". I was thinking alphabetical thing and maybe the second one was cancelled because the first one had already been done. Any suggesions/recomendations??? If I connect to Dalnet can any of the 'on join' notices from Dalnet be used to trigger the new "/server blahblahblah" to start a new connection to Undernet? Or how can I trigger a second connection to the bnc for the second network?

#135695 15/11/05 09:58 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Ok...

I think you're looking for ON CONNECT for use with different networks. ON START refers to what happens when opening mIRC. If you just want to connect to multiple networks, why not just use this, though...

on *:start: { server IP PORT PASS | server -m IP PORT PASS | server -m IP PORT PASS }

Just use different IP/PASS as needed.

Also, if you're checking something based on the network, you can use $network to determine what one your event is on.

Also, you may just need to work off your snotice event... if $network == dalnet, do this... elseif $network == undernet, do that... that sort of thing.

I'm not entirely sure how connecting through a bnc will be different as far as how things are done... this is based solely on normal connections, but probably will work still.


Invision Support
#Invision on irc.irchighway.net
#135696 15/11/05 10:38 PM
Joined: Nov 2005
Posts: 6
D
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
D
Joined: Nov 2005
Posts: 6
Ok, maybe Im trying to over complicate things. Mainly what it is, is if I get disconnected from my bnc, Im just trying to get it to auto-reconnect through my mIRC. So could I do something like this:

if $network == dalnet
on *:disconnect:{
/server blahblahblah.net:PORT
timerbnc1 1 3 /quote PASS blah
timerbnc2 1 5 /vip blahblah.org
timerbnc31 1 6 /conn dalnetserver.net 6667
}

elseif $network == undernet
on *:disconnect:{
/server blahblahblah.net:PORT
timerbnc1 1 3 /quote PASS blah
timerbnc2 1 5 /vip blahblah.org
timerbnc31 1 6 /conn undernetserver.net 6667
}

Sorry, I am just starting to try and learn different scripting things so I dont know very much.

#135697 16/11/05 12:19 AM
Joined: Aug 2005
Posts: 525
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Aug 2005
Posts: 525
Code:
on *:START:{ server 123.123.123.123 PORT PASS }

on *:DISCONNECT:{
  if ($network == DalNet) {
    set %daldiscon true
  }
  elseif ($network == UnderNet) {
    set %unddiscon true
  }
  server 123.123.123.123 PORT PASS
}

on *:SNOTICE:Welcome to BNC 2.6.4*:{
  if (%daldiscon == true) {
    quote vip my.vhost.com
    quote conn irc.dalnet-server.com
    set %daldiscon false
  }
  elseif (%unddiscon == true) {
    quote vip my.vhost.com
    quote conn irc.undernetserver.org
    set %unddiscon false
  }
}


Link Copied to Clipboard