Skip to content
General Chat Talk

Command For When Opening Mirc

A TG007 community discussion started by mcdanielnc89.

Discussion 20 posts
Page 1 of 1
Open
Topic #11724 · 20 published posts · 4,131 views

Hey,

 

Whenever I open mIRC, how can I create a timer where it will join the servers I specify when loading mirc?

On start event.

 

Really this event is when the individual script file is loaded, but that's what happens when you start mirc.

Thanks Travis, I'll have to check out the onstart events. I'm back at ground zero with scripting again, lol.

lol that is a cute signature picture nat :)

Be Kind. Everyone you meet is fighting a great battle.

 

 

 

*Previously known as Gwen

alias koach /server irc.koach.com

on *:CONNECT: { 
  if ($network == Koach.com) {
    /ns identify *password*
    /join #tg007
    /join #koachsworkshop
    /join #bruce
    /join #irchainscriptz
    /join #essex_house
    /join #test
    /join #irpg
  }
}

 

This is mine, its not on Start but when mirc opens i just type /koach and it joins the rooms. Replace *password* w/ your pass for most irc servers, (Unreal) i believe is used on koach. All you havta do is replace 'alias koach' w/ the on START coding and itll connect then :)

So you would just say:

 

on *:start:koach

 

or

 

on *:start:{
if (%koach) { koach }
}

menu menubar {
-
$iif(!%koach,$style(1)) Koach:{ $iif(!%koach,set,unset) %koach $true }
}

 

 

Edit:

Hey Kronic, you know you can say: /join #chan1,#chan2,#chan3,#chan4

Edited Dec 17, 2008 5:53 AM by Travis
lol that is a cute signature picture nat :)

LOL. Thanks!

 

 

 

Thanks for the code help too. I almost had it right, HAHA

Ok, I needed somethign a lil different, LOL.. I got it to partially work,but can't get he others to work. When I connect i want it to join the following servers, Somehow i believe I'm goign to hsve to sit up an If/elseif statemtn.

 

on *:START: {

/server -m irc.wyldryde.org

/ns identify forevermore

/join #geekstogo

}

on *:START: {

/server -m irc.mozilla.org

/ns identify forevermore

/join #firefox,#addons

}

on *:START: {

/server -m irc.freenode.com

/ns identify forevermore

/join #xhtml,#html,#css,#php,#javascript,#phpBB

}

on *:START: {

/server -m irc.deviantart.com

/ns identify forevermore

/join #devart

}

You can only have one event per file.

 

What you need to do is use /scon and $scon.

 

You connect to a server, then you connect to another server and set scon or scid to that connection which makes mIRC focus on that connection. Otherwise it will be doing the commands to the first connection.

 

When you want to write scripts that switch around to your different connections (different servers) you have to make the connection you want active first using /scid or /scon. Then after it's active you can do any commands for that connection.

 

When you type server thats attempting to connect to a server. It doesnt mean you are connected and unless you are connected and that server is the active server you cannot send nameserv requests.

 

Typically you monitor a connect event for that server and auth on this.

 

Here is a 1 minute code, should work perfect as long as the networks names are right, so thatll be where to change if their different...

:) goodluck

 

on *:START: {
  /wyldryde
  /mozilla
  /freenode
  /deviantart
}

alias wyldryde /server irc.wyldryde.org
alias mozilla /server -m irc.mozilla.org
alias freenode /server -m irc.freenode.com
alias deviantart /server -m irc.deviantart.com

on *:CONNECT: {
  if ($network == wyldryde) {
    /join #geekstogo
  }
  elseif ($network == mozilla) {
    /join #firefox,#addons
  }
  elseif ($network == freenode) {
    /join #xhtml,#html,#css,#php,#javascript,#phpbb
  }
  elseif ($network == deviantart) {
    /join #devart
  }
}

FANTASTIC!!! That works perfectively! lol..

 

 

 

Thank you so much

 

no problem :P

 

just takes a lil mirc help file reading to get used to it... ;)

I've edited it a little bit and would like to know how I've done... Did I accomplish it?

 

 

on *:START: {
  /timersparkpea 1 5 /sparkpea
  /timerkoach 1 40 /koach
  /timerfreenode 1 50 /freenode
  /timermozilla 1 60 /mozilla
  /timerjax 1 70 /jax
  /timerwyldryde 1 80 /wyldryde
}

alias sparkpea /server four.irc.sparkpea.net
alias koach /server -m irc.koach.com
alias freenode /server -m irc.freenode.com
alias mozilla /server -m irc.mozilla.org
alias jax /server -m irc.xalaris.net
alias wyldryde /server -m irc.wyldryde.org

on *:CONNECT: {
  if ($network == sparkpea) {
    /timeridentify 1 10
        /nickserv identify [email protected] PASSWORDHERE
        /timercmc 1 5 /join #Christians~Meeting~Christians
  }
  elseif ($network == koach) {
    /nick NBJF /join #NBJF, #ComputingFriends, #koachsworkshop, #thelobby, #TG007
  }
  elseif ($network == mozilla) {
    /nick mcdanielnc89 /nickserv identify PASSWORDHERE /join #firefox,#addons
  }
  elseif ($network == jax) {
    /nick mcdanielnc89 /nickserv identify PASSWORDHERE /join #thebeagleclub,#lobby
  }  
  elseif ($network == freenode) {
    /nick mcdanielnc89 /nickserv identify PASSWORDHERE /join #html,#css,##php,#phpbb
  }
  elseif ($network == koach) {
    /nick mcdanielnc89 /nickserv identify PASSWORDHERE /nick NBJF /timer 11 2 /join #ComputingFriends,#koachsworkshop,#NBJF,#TG007,#thelobby
  }  
}

You need to start echoing $network to see what the actual network is. I know for a fact atleast two of those don't match with the echoed $network.

 

on *:START: {
  /timersparkpea 1 5 /sparkpea
  /timerkoach 1 40 /koach
  /timerfreenode 1 50 /freenode
  /timermozilla 1 60 /mozilla
  /timerjax 1 70 /jax
  /timerwyldryde 1 80 /wyldryde
}

alias sparkpea /server four.irc.sparkpea.net
alias koach /server -m irc.koach.com
alias freenode /server -m irc.freenode.com
alias mozilla /server -m irc.mozilla.org
alias jax /server -m irc.xalaris.net
alias wyldryde /server -m irc.wyldryde.org

on *:CONNECT: {
  if ($network == sparkpea) {
    /timeridentify 1 10
        /nickserv identify [email protected] PASSWORDHERE
        /timercmc 1 5 /join #Christians~Meeting~Christians
  }
  elseif ($network == mozilla) {
    /nick mcdanielnc89 
   /nickserv identify PASSWORDHERE 
   /join #firefox,#addons
  }
  elseif ($network == jax) {
    /nick mcdanielnc89 
   /nickserv identify PASSWORDHERE 
   /join #thebeagleclub,#lobby
  }  
  elseif ($network == freenode) {
    /nick mcdanielnc89 
   /nickserv identify PASSWORDHERE 
   /join #html,#css,##php,#phpbb
  }
  elseif ($network == koach.com) {
    /nick mcdanielnc89 
   /nickserv identify PASSWORDHERE 
   /nick NBJF 
   /timer 11 2 /join #ComputingFriends,#koachsworkshop,#NBJF,#TG007,#thelobby
  }  
}

Edited Dec 29, 2008 10:01 PM by X-Fusion
You need to start echoing $network to see what the actual network is. I know for a fact atleast two of those don't match with the echoed $network.

 

Doesn't match? I can manually connect to them perfectly...

I'm curious about these lines ....

 

 

/nick NBJF /join #NBJF, #ComputingFriends, #koachsworkshop, #thelobby, #TG007

 

 

Shouldn't there be a pipe between these commands?

 

 

{ nick NBJF | join #NBJF, #ComputingFriends, #koachsworkshop, #thelobby, #TG007 }

Doesn't match? I can manually connect to them perfectly...

 

Of course you can manually connect to them fine, because your using an IRC protocol. To do what you want, you need to use the mIRC protocol, which requires you to read $network.

What he is trying to say, Nate, is that he doesn't think the network names you have are correct.

 

if ($network == sparkpea) for instance,

 

If you are on sparkpea, $network might not be 'sparkpea'.

 

 

What he is asking you to do is to go to each network, join a room and ...

 

//echo -a Network == $network

 

 

Do this. Now check what the server gives you with what you have in your code. :)

also instead of a timer just use...

 

on *:START: {
   server four.irc.sparkpea.net
   server -m irc.koach.com
   server -m irc.freenode.com
   server -m irc.mozilla.org
   server -m irc.xalaris.net
   server -m irc.wyldryde.org
}

 

works fine unless you got a TERRIBLY slow pc....

 

other then that fix the $network names and it should work....

when joining rooms on networks it would be easier just to use mirc's built in favorites

Get information about ircWx here