mIRC Home    About    Download    Register    News    Help

Print Thread
#110531 07/02/05 10:36 PM
Joined: Feb 2005
Posts: 8
L
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
L
Joined: Feb 2005
Posts: 8
Hi,

If this is the wrong forum for my post, I apologize. Now to my question. I've never made any scripts before, so I don't even know if this is possible. What I want to do is that when I join a specific channel, a script is executed (it's for an idle RPG game; I'm getting disconnected from time to time (I think it's due to my connection), and what I want is a script that would automatically log me in (which is done with /msg idle login username password)). Is this possible?

Thanks in advance.

#110532 07/02/05 10:42 PM
Joined: Jun 2003
Posts: 5,024
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Jun 2003
Posts: 5,024
Sure is smile I personally use the following:

on me:*:join:#idlerpg:{
.msg idlerpg login username password
}


If you join multiple networks, and only want this to be activated when you join #idlerpg on one specific network, use this:

on me:*:join:#idlerpg:{
if ($network == Network) {
.msg idlerpg login username password
}
}


(Assuming #idlerpg is the name of the channel, otherwise replace it with something else). Replace 'Network' with the network name (e.g. DALnet, EFnet, Undernet, etc.), and replace 'username' and 'password' with your username and pass smile

This code would go in your Remote section of the Script Editor, press ALT+R to access it. If you see a file with code already in it when you open that dialog, make sure you start a new file, with File > New.

For further information, see /help ON JOIN.

Regards,


Mentality/Chris
#110533 07/02/05 11:31 PM
Joined: Feb 2005
Posts: 8
L
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
L
Joined: Feb 2005
Posts: 8
It worked like a charm. Thank you!

#110534 07/02/05 11:36 PM
Joined: Feb 2005
Posts: 8
L
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
L
Joined: Feb 2005
Posts: 8
I just came to think of another thing. How do you join specific channels when you connect to a specific network? Let us assume that I want to connect to irc.domain.com, and automatically join the channels #foo and #bar. How would I do that?

#110535 07/02/05 11:38 PM
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
Code:
on *:connect:{
  if ($network == network1) { join #chan1,#chan2,#etc }
  elseif ($network == network2) { join #chan1,#chan2,#etc }
}


New username: hixxy
#110536 07/02/05 11:39 PM
Joined: Mar 2004
Posts: 175
Vogon poet
Offline
Vogon poet
Joined: Mar 2004
Posts: 175
Put this into your remotes section of your scripts editor:

Code:
On *:CONNECT: {
  If ($Server == irc.domain.com) { join #foo,#bar }
}


- Relinsquish
#110537 08/02/05 12:13 AM
Joined: Feb 2005
Posts: 8
L
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
L
Joined: Feb 2005
Posts: 8
Thanks guys, that worked perfectly.


Link Copied to Clipboard