cooldude13233 commented on a Page, Relay Script 1.0  -  Jul 19, 2011

@FordLawnmower i have made a fix to the script that i will post bellow BUT thing is that if someone changes there nick or quits and if the script is loaded in lots of chats on the 2 servers it will message it in all the chats. nonetheless i want the script to see if the person quits or changed nicks on a specific chat and NOT all chats

###############################################
# Relay script 1.0 by ChiefDean
# irc.HeatWaveIRC.net #Heatwave
###############################################

Menu * {
  -
  Relay Setup: {
    set %serv1 $input(Enter Server One here.,e,Relay Script 1.0 by ChiefDean)
    set %chan1 $input(Enter Channel One here.,e,Relay Script 1.0 by ChiefDean)
    set %serv2 $input(Enter Server Two here.,e,Relay Script 1.0 by ChiefDean)
    set %chan2 $input(Enter Channel Two here,e,Relay Script 1.0 by ChiefDean)
    if ($numtok(%serv1 %chan1 %serv2 %chan2,32) == 4) { $input(Setup Complete.Remember to turn the power on!,,Script 1.0 by ChiefDean) }
    else { $input(Critical Setup Error! Please return to Relay Setup and Start over!,,Script 1.0 by ChiefDean) }
  }
  $iif($group(#Relay) == On,$style(1)) Relay Power Switch
  .$iif($group(#Relay) == On,$style(2)) On: .enable #Relay
  .$iif($group(#Relay) == Off,$style(2)) Off: .disable #Relay

  -
}
alias -l net {
  var %netcount $scon(0)
  while %netcount {
    if ($scon(%netcount).network == $1) { var %netid %netcount }
    dec %netcount
  }
  scon %netid return $!cid
}
alias -l relay { 
  scid $net($1)
  if ($me ison $3) { $2- }
}
alias -l RCheck { 
  if ($1 == $2) && ($3 == $4) { return 1 }
  else return 0
}
#Relay off
on *:TEXT:*:#:{
  if ($rcheck($network,%serv1,$chan,%chan1)) { relay %serv2 msg %chan2 $+(04<,04,14,$nick,04@,14,$network,04,>) $1- }
  elseif ($rcheck($network,%serv2,$chan,%chan2)) { relay %serv1 msg %chan1 $+(04<,04,14,$nick,04@,14,$network,04,>) $1- }
}
on *:MODE:#:{
  if ($rcheck($network,%serv1,$chan,%chan1)) { relay %serv2 msg %chan2 $+(04<,04,14,Mode,04@,14,$network,04,>) $nick sets mode $1- }
  elseif ($rcheck($network,%serv2,$chan,%chan2)) { relay %serv1 msg %chan1 $+(04<,04,14,Mode,04@,14,$network,04,>) $nick sets mode $1- }
}
on *:NICK: {   
  if ($rcheck($network,%serv1)) { relay %serv2 msg %chan2 $+(04<,14,Nick Change,04@,14,$network,04,>) $nick is now known as $newnick }
  elseif ($rcheck($network,%serv2)) { relay %serv1 msg %chan1 $+(04<,14,Nick Change,04@,14,$network,04,>) $nick is now known as $newnick }
}
on *:join:#: {  
  if ($rcheck($network,%serv1,$chan,%chan1)) { relay %serv2 msg %chan2 $+(04<,14,Join,04@,14,$network,04,>) $Nick has joined $chan }
  elseif ($rcheck($network,%serv2,$chan,%chan2)) { relay %serv1 msg %chan1 $+(04<,14,Join,04@,14,$network,04,>) $Nick has joined $chan }
}  
on *:kick:#: {  
  if ($rcheck($network,%serv1,$chan,%chan1)) { relay %serv2 msg %chan2 $+(04<,14,Kick,04@,14,$network,04,>) $knick gets kicked from $chan by $+($nick,.) }
  elseif ($rcheck($network,%serv2,$chan,%chan2)) { relay %serv1 msg %chan1 $+(04<,14,Kick,04@,14,$network,04,>) $knick gets kicked from $chan by $+($nick,.) }   
} 
on *:part:#: {  
  if ($rcheck($network,%serv1,$chan,%chan1)) { relay %serv2 msg %chan2 $+(04<,14,Part,04@,14,$network,04,>) $Nick has left $chan }
  elseif ($rcheck($network,%serv2,$chan,%chan2)) { relay %serv1 msg %chan1 $+(04<,14,Part,04@,14,$network,04,>) $Nick has left $chan }   
} 
on *:ACTION:*:#: {  
  if ($rcheck($network,%serv1,$chan,%chan1)) { relay %serv2 msg %chan2 $+(04<,04,14,$nick,04@,14,$network,04,>) 6* $nick $1- }
  elseif ($rcheck($network,%serv2,$chan,%chan2)) { relay %serv1 msg %chan1 $+(04<,14,$nick,04@,14,$network,04,>) 6* $nick $1- }
}
on 1:QUIT: {  
  if ($rcheck($network,%serv1)) { relay %serv2 msg %chan2 14 $+ $nick Quit $+($network,.) }
  elseif ($rcheck($network,%serv2)) { relay %serv1 msg %chan1 14 $+ $nick Quit $+($network,.) }   
}
#Relay End
 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.