mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Apr 2014
Posts: 4
B
borgfan Offline OP
Self-satisified door
OP Offline
Self-satisified door
B
Joined: Apr 2014
Posts: 4
I have the feature Enable Join on connect enabled because this way I don't have to join the channels manually, the problem is that mIRC joins the channel right after I connect and that can be a problem.

What would be nice:

1- Wait x seconds to join channel(s) after connect
2- When joining a channel wait x seconds between joining another channel

The way it works everytime I connect (or reconnect) mIRC joins all channels at the same time, it is particularly a problem with big channels because of the lag.

Another problem that I have is the usually it joins the channel so fast I don't have time to authenticate my nickname, so certain channels will not let me in before that.

I have both lines below in the Option > Perform window.

/msg NickServ IDENTIFY xxxx
/join #channel

Even though the /msg nickserv comes first mIRC will try to join the channel first and of course not succeed because I need to authenticate before joining the channel.

Joined: Dec 2013
Posts: 779
N
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
I made something which I believe has the features you want.
Open your remote scripts editor by pressing ALT + R and paste this code in there. Replace the UPPER words with your own information, such as server, nick and password.
Code:
on 1:start: server SERVER
on 1:connect: { 
  identify
  channel join
}

alias -l identify { nick NICK | .msg nickserv identify PASSWORD }
alias channel {
  if ($1 == join) {
    if (!$timer(join)) { timerjoin 0 3 channel join }
    else { 
      var %limit $ini(chans.ini,chanlist,0)
      inc %c 
      if (%c > %limit) { unset %c | timerjoin off | halt }
      var %chan $ini(chans.ini,chanlist,%c)
      j %chan
    } 
  }
  elseif ($1 == add) { 
    if ($2 == all) { 
      var %chans $chan(0)
      while (%chans) {
        var %chan $chan(%chans)
        writeini chans.ini chanlist %chan 1
        dec %chans
        echo -a Added %chan to the list of auto joins
      }
    }
    elseif ($2 == this) { writeini chans.ini chanlist # 1 | echo -a Added # to the list of auto joins }
    else { writeini chans.ini chanlist $2 1 | echo -a Added $2 to the list of auto joins }
  }
  elseif ($1 == rem) { 
    if ($2 == all) { remini chans.ini chanlist | echo -a removed all channels from the list. } 
    elseif ($2 == active) {
      var %chans $chan(0)
      while (%chans) {
        var %chan $chans(%chans)
        if ($readini(chans.ini,chanlist,%chan)) { remini chans.ini chanlist %chan | echo -a removed %chan from the list. }
        else echo -a %chan wasn't on the list to begin with.
        dec %chans
      }
    }
    elseif ($2 == this) {
      if ($readini(chans.ini,chanlist,#)) { remini chans.ini chanlist # | echo -a removed # from the list. }
      else echo -a # wasn't on the list to begin with.
    }
    else { 
      if ($readini(chans.ini,chanlist,$2)) { remini chans.ini chanlist $2 | echo -a removed $2 from the list. }
      else echo -a $2 wasn't on the list to begin with.
    }
  }
}
The syntax to add/remove channels are:
/channel add all > Adds all channels you're in to the list.
/channel add this > Adds the channel you wrote it in to the list
/channel add CHANNELNAME > Adds CHANNELNAME to the list.
/channel rem all > Removes all channels from the list
/channel rem active > Removes all channels you're in from the list
/channel rem this > Removes the channel you wrote it in from the list
/channel rem CHANNELNAME > Removes CHANNELNAME from the list

If you are to use this, please disable the built in features of mIRC such as the Join on Connect (Favorites)

I set the timer to join after 3 seconds, but you can change it to however many seconds you'd like. Just change the 3 in this portion of the code -
Code:
    if (!$timer(join)) { timerjoin 0 3 channel join }

Last edited by Nillen; 19/10/14 02:52 PM. Reason: Forgot to add a remove function

Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net
Joined: Jul 2006
Posts: 4,150
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,150
As far as 1) is concerned, mIRC has the /autojoin command, which can be used to delay the joining (literally waits X secs before sending /join)

2) Would be implemented with /autojoin, possibly a new switch.

mIRC will not try to join the channel first, it will first send /msg, the server is simply answering your /join command before Nickserv is.

The way to identifity to nickserv or another service never has been a standard, which is why mIRC never had any of those built-in, but a better built-in way to set up multiple connections to different network with different channels always has been asked, perhaps it could include an option to only join channel once you got a certain answer, you would select for example "[✓]use notice" with two editboxes, one to specify a nickname (possibly a list of nicknames) which would be nickserv in this case, and a second editbox "matchtext" where you would put the matchtext to trigger on (you can change nickserv's language so it may not be always english message), something like *IDENTIFY*.

In the meantime with /autojoin -d3, you should be fine to get identified before joining.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel

Link Copied to Clipboard