this is a simple relay script
on *:Text:*:<relaychan1:{
if (%relay) {
msg <relayschan2 $+(7,$chr(40), 14,#01, 7,$chr(41), 7,$chr(40),,14,$nick,,7,$chr(41),:) $1- }
}
on *:Text:*:<relaychan2>:{
if (%relay) {
msg <relaychan1 $+(7,$chr(40), 14,#2, 7,$chr(41), 7,$chr(40),,14,$nick,,7,$chr(41),:) $1-
}
}
menu channel {
Relay
.on: set %relay 1 | echo -t Relay on
.off: unset %relay | echo -t Relay off
}
why using two ON TEXT event??
on *:Text:*:<relaychan1>,<relaychan2>:if (%relay) msg $iif(# = <relaychan1>,<relaychan2>,$v1) $+(7,$chr(40), 14,#0,$iif(# = <relaychan1>,1,2), 7,$chr(41), 7,$chr(40),,14,$nick,,7,$chr(41),:) $1-
menu channel {
Relay
.on: set %relay 1 | echo -t Relay on
.off: unset %relay | echo -t Relay off
}
but better to add an anti flood too
MegaScripters, just my opinion but you should use an alias instead of a menu for something as small as setting and unsetting a variable. also um id use $remove($1-,$) instead of just $1- to guard against injections and that kind of garbage a bit. and i kind of like the -e switch for global var's so that if you close mirc and forget to turn this off it will unset the var's.