mIRC Home    About    Download    Register    News    Help

Print Thread
#204089 08/09/08 03:09 AM
Joined: Oct 2007
Posts: 214
B
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Oct 2007
Posts: 214
Hello,

I'd like to make an alias to:

1. Be able to join multiple channels in the following formats:

a.) %#test101,%#test102,%#test103
b.) %#test101 %#test102 %#test103

as well as be able just join a single channel /join %#test101

2. Check and see if the prefix "%#" is in the beggining of the channel name and if its not to add it in. Ex1. test101 (%#test101)

3. If there is a space $chr(32) in the channel name, to automatically add the \b Ex. %#testing this channel (%#testing\bthis\bchannel)

I know its lots to ask for but thanks a bunch and I appreciate all your help.

Kind regards,

Jay

Last edited by Buggs2008; 08/09/08 03:11 AM.
Buggs2008 #204091 08/09/08 06:02 AM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
The normal /join command will handle multiple channels if they are comma separated.

As to the space character in a channel name, I have never seen this, but I'm not going to say that they don't exist.

You're going to have difficulties with the space replacement and the second usage that you specified.. ie: how is mIRC to know if the space is part of the channel name or the separator between channel names.
A further difficulty comes into play if the %# characters are not part of the supplied channel name.

Eg: /j test101 test202
Does mIRC take that to join %#test101 and %#test202
or %#test101\btest202

Buggs2008 #204111 08/09/08 08:15 PM
Joined: Oct 2007
Posts: 214
B
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Oct 2007
Posts: 214
This is what I have so far, is it messy?

Code:
  if ($1 == JOIN) { if ($numtok($2,44) > 1) { var %x 1 | while ($gettok($2,%x,44)) {
        var %c = $ifmatch
        if ($left(%c,2) == $+($chr(37),$chr(35))) { join %c | haltdef }
        else { join $+($chr(37),$chr(35),%c) | haltdef }
        inc %x
      }
    }
  }



Link Copied to Clipboard