Broadcast to custom channels

By Yama on Jul 20, 2013

Sometimes you want to use /amsg but it posts the messages only on the current server or you want to set exception for channels.
Well... Here ya go.
The config:

[ymsg]
#planet=0
#help=1

All the channels with a '1' will be ignored on the broadcast, everything else is considered as not filtered.
If you are on 4 channels, two channels in one network, you can type the following command to post a message in all except in the channel #help.

/ymsg Hi guys :D

You can filter channels or add channels for ONCE in the command.
Directly after the command you have to type '+' or '-' for adding, or removing a channel for the broadcast.
Example:

/ymsg +#help.-#vhost.+#yorp Goodbye

With this command the broadcast will be posted in #help, too. It overrides for ONCE the config.
And it removes for ONCE the channel #vhost.

I posted the script and many others earlier on my german blog http://blog.yamahi.eu

    ;--------------------------------------------------- - -  -    -
    ;| YMSG © 06.04.2013
    ;--------------------------------------------------- - -  -    -
    ;| Version: 0.3
    ;| mIRC: v7.32
    ;| Script-Planung: Yama
    ;| Script-Mod: Yama
    ;--------------------------------------------------- - -  -    -
    ;| Beschreibung: Extrem manipulable /amsg
    ;--------------------------------------------------- - -  -    -

    [ymsg]
    #planet=0
    #help=1

    alias ymsg {
      /var %j 1
      /while ( %j <= $scon(0) ) {
        /scon %j
        /var %i 1
        /while ( %i <= $chan(0) ) {
          if ( $left($1,1) == $chr(43) || $left($1,1) == $chr(45) ) {
            /var %m 1
            /while ( %m <= $gettok($1,0,46) ) {
              if ( $left($gettok($1,%m,46),1) == $chr(43) && $right($gettok($1,%m,46),-1) == $chan(%i) )  {
                /msg $right($gettok($1,%m,46),-1) $2-
              }
              /inc %m
            }
          }
          if ( $readini($script,ymsg,$chan(%i)) != 1 ) {
            if ( $chan(%i) !isin $1 ) {
              if ( %m == $null ) {
                /msg $chan(%i) $1-
              }
              else {
                /msg $chan(%i) $2-
              }
            }
          }
          /inc %i
        }
        /inc %j
      }
    }

Comments

Sign in to comment.
Cuddletauren   -  Jan 26, 2014

Just what I needed!

 Respond  
Savage_CL   -  Aug 09, 2013

For the channel modifiers, you may want to use a comma (,) instead of a period (.) because channel names allow for periods on some, if not all networks. Also, you should still use multi-target messaging, so you don't evade channel flags.

Yama  -  Aug 17, 2013

Yeah, you are right, I should use a comma. I used period, cause mIRC uses comma for the local parameters for commands, but since that is an custom alias, there shouldn't be a problem with a comma.

Well, everyone can decide if they want to use this script to evade the channel flags. Would be bad if users don't know these flags.

Will update later.

rpm  -  Sep 18, 2013

Great script, where would i put in a delay timer so each channel would get the message 2 seconds apart??

Sign in to comment

Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.