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
}
}
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.