Simple Relay

By MegaScripters on May 25, 2010

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 
}

Comments

Sign in to comment.
Jethro   -  May 26, 2010

That is a run-on sentence according to English 101.

 Respond  
TheNitelyfe   -  May 26, 2010

uh injections as in code injections, and i just meant i think its better to be safe then sorry since theres a lot of people out there that would try to manipulate something like this just my opinion
you have no clue what you're talking about at all

 Respond  
WorldDMT   -  May 26, 2010

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

 Respond  
jsg55   -  May 25, 2010

uh injections as in code injections, and i just meant i think its better to be safe then sorry since theres a lot of people out there that would try to manipulate something like this just my opinion

 Respond  
TheNitelyfe   -  May 25, 2010

also um id use $remove($1-,$) instead of just $1- to guard against injections and that kind of garbage a bit.

  1. Injections?
  2. It doesn't matter, because $1- isn't evaluated twice, only once as the message (if you get what I mean) in an on TEXT event.
 Respond  
jsg55   -  May 25, 2010

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.

 Respond  
Remuser   -  May 25, 2010

what is this?
what he do?

 Respond  
TheNitelyfe   -  May 25, 2010

wat

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