mIRC Home    About    Download    Register    News    Help

Print Thread
Auto connect and join channels #263701 06/09/18 10:25 AM
Joined: Sep 2018
Posts: 8
S
Shamrock Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
S
Joined: Sep 2018
Posts: 8
I've been using a script to auto connect and join:

Code:
on *:START:{
  server irc.somename.net -j #chat
  server ircnet.org -j #blah

}


I want to add another channel to one of the servers, so it joins 2 channels on one of the servers with the same nick. I can't seem to get anything to work. It either just joins one of the channels or joins the second one with another nick.

Anyone help out? Thanks.

Re: Auto connect and join channels [Re: Shamrock] #263702 06/09/18 10:39 AM
Joined: Sep 2018
Posts: 1
A
ArThuR Offline
Mostly harmless
Offline
Mostly harmless
A
Joined: Sep 2018
Posts: 1
cause you use only server command, for joining another server you should use this command => /server -m YourServer

So It's Mean you should change your codes to:

Code:
 on *:START:{
  server irc.somename.net -j #chat
  server -m ircnet.org -j #blah
} 

Last edited by ArThuR; 06/09/18 10:40 AM.
Re: Auto connect and join channels [Re: Shamrock] #263704 07/09/18 02:04 AM
Joined: Feb 2003
Posts: 2,669
Raccoon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,669
ArThuR does address the glaring problem with your script, so that you can now connect to two different servers at the same time. But in the off chance you also wanted to join a second or third channel on either of those two servers, just separate the channel names with a comma.

Code:
server    SavedGroup  -j #mirc,#irchelp,#chat
server -m irc.foo.bar -j #politics,#computers

If you want different nicknames on each server, include the -i switch.

Code:
server    SavedGroup  -j #mirc,#irchelp,#chat -i Rob Rob- robert@noemail My Name is Robert
server -m irc.foo.bar -j #politics,#computers -i Bob Bob` bob@noemail My Name is Bobert

If you save your servers into mIRC's server list, grouping them by network name, you can also store additional settings like NickServ login password. In the above examples, SavedGroup references a saved server group.

You currently cannot store a chosen nickname for a server in mIRC's saved servers, so that's where the -i switch comes in handy above.
-i $mnick $anick $email $fullname


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
Re: Auto connect and join channels [Re: Raccoon] #263705 07/09/18 09:55 AM
Joined: Sep 2018
Posts: 8
S
Shamrock Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
S
Joined: Sep 2018
Posts: 8
Thanks guys. I am using the -m to join more that one server - forgot to type it above.

I see now why it wasn't connecting to more than one channel, I was putting comma space ", " between each channel name.

Working perfect now smile

Re: Auto connect and join channels [Re: Shamrock] #263710 08/09/18 09:29 AM
Joined: Aug 2003
Posts: 246
P
Protopia Offline
Fjord artisan
Offline
Fjord artisan
P
Joined: Aug 2003
Posts: 246
I have a generic autoconnect script which looks at your favourites for channels which are marked as autojoin, and makes an automatic connection to the server so you can autojoin.

Start mirc - and it connects to all the servers and joins all the channels.

If you would like a copy, please PM me with your email address.

Re: Auto connect and join channels [Re: Protopia] #266245 26/10/19 11:52 PM
Joined: Oct 2019
Posts: 1
M
Memebox Offline
Mostly harmless
Offline
Mostly harmless
M
Joined: Oct 2019
Posts: 1
your account is set to not accept PM's, but I'm interested in that script.

Re: Auto connect and join channels [Re: Shamrock] #266406 03/12/19 06:08 PM
Joined: Jan 2007
Posts: 5
T
thomaz Offline
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
T
Joined: Jan 2007
Posts: 5
How do i connect to multiple channels with key?

Code
on *:start: {
  server efnet.port80.se:6667 -j #chan1 key1,#chan2 key2
}

doesnt work. it only joins 1st channel+key

Re: Auto connect and join channels [Re: thomaz] #266407 03/12/19 06:25 PM
Joined: Feb 2015
Posts: 60
K
kap Offline
Babel fish
Offline
Babel fish
K
Joined: Feb 2015
Posts: 60
According to https://en.wikichip.org/wiki/mirc/commands/server this should work:

Code
on *:start: {
  server efnet.port80.se:6667 -j #chan,#chan2 key1,key2
}


Note: Use * to specify no key is needed for that channel.


irc://irc.mircscripts.net:+6697/chat
Re: Auto connect and join channels [Re: kap] #266408 03/12/19 06:56 PM
Joined: Jan 2007
Posts: 5
T
thomaz Offline
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
T
Joined: Jan 2007
Posts: 5
thx a lot, works now. smile

Re: Auto connect and join channels [Re: thomaz] #266410 03/12/19 07:23 PM
Joined: Dec 2019
Posts: 2
T
TimeRider Offline
Bowl of petunias
Offline
Bowl of petunias
T
Joined: Dec 2019
Posts: 2
Okay, I have this for more networks. If you want auto nickserv and oper password to be automatic, this works well!

on *:CONNECT:{
if ($network == Network1) {
nickserv identify password
oper username password
join #chan1,#chan2,#chan3
}

elseif ($network == Network2) {
nickserv identify ...
join #chan,#chan2,#chan3,...
}
;and so on
}