All pastes #634847 Raw Edit

Untitled

public text v1 · immutable
#634847 ·published 2007-07-26 18:17 UTC
rendered paste body
on *:load:{
  set %radiochan #paradiseservers
  set %serverip1 72.55.133.13
  set %serverip2 
  set %port1 8200
  set %port2 
}

on *:JOIN:#:{
  if ($ulevel == 1) {
    if ($chan == #paradiseservers) {
      notice $nick Welcome to Paradise Radio. Type @info for more informations about commands
    }
  }
  if ($ulevel) {
    if ($ulevel == 1) { halt }
    if ($ulevel >= 200) {
      var %info $ulist($address($nick,1),$ulevel,1).info
      msg $chan 3,13,1[9« 15Paradise3SERVERS 9»3][9«15,1 $nick $level($address($nick,6)) $+ , %info 9»3][^O]
      if ($chan == #paradiseservers) { notice $nick 3,13,1[9« 15Frag3HYPE 9»3][9«15,1 [@managercommands] [@ownercommands] [@DJcommands] [@deletestaff] [@addstaff] [@streaminfo] [@override commands] 9»3][^O]
      }
    }
  }
}

on *:NICK:{
  if ($nick == %DJ1) {
    set %DJ1 $newnick
  }
  if ($nick == %DJ2) {
    set %DJ2 $newnick
  }
}

on *:TEXT:@commands:#paradiseservers:{
  msg $chan 3,1[9« 15Paradise3SERVERS 9»3][9« 15Ventrilo - @vent 9»3][9« 15Stream - @streams 9»3][9« 15Now Playing - @song1 @song2 9»3][9« 15Listeners - @listeners @listeners1 @listeners2 9»3][9« 15DJ - @DJ1 @DJ2 9»3][9« 15Shoutout - @shoutout1 @shoutout2 9»3][9« 15Request-a-song - @request1 @request2 9»3][9« 15Cut(If you don't like the song) - @cut1 @cut2 9»3]
}

on *:TEXT:@vent*:#paradiseservers:{
  notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9« 15Ventrilo ip:  port: 9»3]
}

on *:TEXT:@info:#:{
  notice $nick 3,1[9« 15Visit our website at  9»3]
  notice $nick 3,1[9«15 $me scripted by spX 9»3]
}

on *:TEXT:@DJ1:#paradiseservers:{
  if (%DJ1) {
    if ($nick == %DJ1) {
      notice $nick 3,1[9« ParadiseServers 9»3][9«15,1 You're already the DJ that is annihilating the radio waves for Stream-1 9»3]
    }
    else {
      msg $chan 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 Stream-1 DJ: %DJ1 9»3]
    }
  }
  else {
    msg $chan 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 Stream-1 is 4OFFLINE15,1, ask a DJ to go on 9»3]
  }
}

on *:TEXT:@DJ2:#paradiseservers:{
  if (%DJ2) {
    if ($nick == %DJ2) {
      notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 You're already the DJ that is annihilating the radio waves for Stream-2 9»3]
    }
    else {
      msg $chan 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 Stream-2 DJ: %DJ2 9»3]
    }
  }
  else {
    msg $chan 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 Stream-2 is 4OFFLINE15,1, ask a DJ to go on 9»3]
  }
}

on *:TEXT:@onair1:#paradiseservers:{
  if ($nick >= 200) {
    if ($nick == %DJ1) {
      notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 You're already on Stream-1 9»3]
      halt
    }
    if (%DJ1) {
      msg $chan 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 %DJ1 is already Stream-1 9»3]
      halt
    }  
    if (!%DJ1) {
      set %DJ1 $nick
      amsg 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 %DJ1 is now on Stream-1 9»3]
    }
  }
}

on *:TEXT:@onair2:#paradiseservers:{
  if ($nick >= 200) {
    if ($nick == %DJ2) {
      notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 You're already on Stream-2 9»3]
      halt
    }
    if (%DJ2) {
      msg $chan 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 Stream-2 DJ: %DJ2 9»3]
      halt
    }  
    if (!%DJ2) {
      set %DJ2 $nick
      amsg 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 %DJ2 is now on Stream-2 9»3]
    }
  }
}

on *:TEXT:@offair1:#paradiseservers:{
  if ($nick >= 200) {    
    if (%DJ1) {
      if ($nick == %DJ1) {
        set %requests1 on
        set %shoutouts1 on
        set %cuts1 on
        notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 %DJ1 is now off air. 9»3]
        amsg 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 %DJ1 is now off air. 9»3]
        unset %DJ1
      }
    }
  }
}

on *:TEXT:@offair2:#paradiseservers:{
  if ($nick >= 200) {    
    if (%DJ2) {
      if ($nick == %DJ2) {
        set %requests1 on
        set %shoutouts1 on
        set %cuts1 on
        notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 %DJ2 is now off air. 9»3]
        amsg 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 %DJ2 is now off air. 9»3]
        unset %DJ2
      }
    }
  }
}

on *:TEXT:@shoutout1*:#paradiseservers:{
  if (!%DJ1) {
    msg $chan 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 Stream-1 Is 4OFFLINE15,1, ask a DJ to go on 9»3]
  }
  else {
    if (!$2) {
      notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 You did not submit an actual shoutout 9»3]
      notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 Example: @Shoutout1 FragHYPE is the best 9»3]
    }
    else {
      if ($2 == on) {
        if ($nick == %DJ1) {
          if (%shoutouts1 == off) {
            notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 Shoutouts1 are already off 9»3] | halt
            set %shoutouts1 on
            notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 You turned the command @shoutout1 on 9»3]
            msg $chan 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 %DJ1 turned the command @shoutouts1 on 9»3]
            halt
          }
        }
      }
      if ($2 == off) {
        if ($nick == %DJ1) {
          if (%shoutouts1 == off) {
            notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 Shoutouts1 are already off 9»3] | halt
            set %shoutouts1 off
            notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 You turned the command @shoutouts1 off 9»3]
            msg $chan 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 %DJ1 turned the command @shoutouts1 off 9»3]
            halt
          }
        }
      }
      if (%shoutouts1 == off) {
        notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 This command was turned off by %DJ1 9»3]
        halt
      }
      if (%spam.shoutouts. [ $+ [ $nick ] ] == 1) {
        notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 You can only used this command once every 2 minutes 9»3]
        halt
      }
      else {
        set -u120 %spam.shoutouts. [ $+ [ $nick ] ] 1
        if ($nick == %DJ1) {
          notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 You can't send a shoutout to yourself 9»3]
        }
        else {
          notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 Your shoutout has been sent to %DJ1 9»3]
          msg %DJ1 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 Shoutout by $nick $+ :  $2- 9»3]
        }
      }
    }
  }
}
on *:TEXT:@requests1*:#paradiseservers:{
  if (!%DJ1) {
    notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 Stream-1 Is 4OFFLINE15,1, ask a DJ to go on 9»3]
  }
  else {
    if (!$2) {
      notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 You did not submit an actual request 9»3]
      notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 Example: @request %song1 9»3]
    }
    else {
      if ($2 == on) {
        if ($nick == %DJ1) {
          if (%requests1 == on) {
            notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 requests are already on 9»3] | halt
            set %requests1 on
            notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 You turned the command @request on 9»3]
            msg $chan 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 %DJ1 turned the command @request on 9»3]
            halt
          }
        }
      }
    }
    if ($2 == off) {
      if ($nick == %DJ1) {
        if (%requests1 == off) {
          notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 requests are already off 9»3] | halt
          set %requests1 off
          notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 You turned the command @request off 9»3]
          msg $chan 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 %DJ1 turned the command @request off 9»3]
          halt
        }
      }
    }
  }
  if (%requests1 == off) {
    notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 This command was turned off by %DJ1 9»3]
    halt
  }
  if (%spam.request. [ $+ [ $nick ] ] == 1) {
    notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 You can only used this command once every 2 minutes 9»3]
    halt
  }
  else {
    set -u120 %spam.request. [ $+ [ $nick ] ] 1
    if ($nick == %DJ1) {
      notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 You can't send a request to yourself 9»3]
    }
    else {
      notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 Your request has been sent to %DJ1 9»3]
      msg %DJ1 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 Request by $nick $+ : $2- 9»3]
    }
  }
}

on *:TEXT:@cut1*:#paradiseservers:{
  if (!%DJ1) {
    notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 Stream-1 Is 4OFFLINE15,1, ask a DJ to go on 9»3]
  }
  else {
    if ($2 == on) {
      if ($nick == %DJ1) {
        if (%cuts1 == on) {
          notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 cuts are already on for Stream-1 9»3] | halt
          set %cuts1 on
          notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 You turned the command @cut1 on for Stream-1 9»3]
          msg $chan 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 %DJ1 turned the command @cut1 on for Stream-1 9»3]
          halt
        }
      }
    }
    elseif ($2 == off) {
      if ($nick == %DJ1) {
        if (%cuts1 == off) {
          notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 cuts are already off 9»3] | halt
          set %cuts1 off
          notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 You turned the command @cut1 off 9»3]
          msg $chan 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 %DJ1 turned the command @cut1 off 9»3]
          halt
        }
      }
    }
    else {
      if (%cuts1 == off) {
        notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 This command was turned off by %DJ1 9»3]
        halt
      }
      if (%spam.cuts. [ $+ [ $nick ] ] == 1) {
        notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 You can only used this command once every 2 minutes 9»3]
        halt
      }
      else {
        set -u120 %spam.cuts. [ $+ [ $nick ] ] 1
        if ($nick == %DJ1) {
          notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 You can't cut yourself 9»3]
        }
        else {
          notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 Your cut request has been sent to %DJ1 9»3]
          msg %DJ1 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 Request to cut the song has been sent by $nick 9»3]
        }
      }
    }
  }
}

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;2nd stream
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

on *:TEXT:@shoutout2*:#paradiseservers:{
  if (!%DJ2) {
    msg $chan 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 Stream-2 Is Offline, ask a DJ to go on 9»3]
  }
  else {
    if (!$2) {
      notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 You did not submit an actual shoutout 9»3]
      notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 Example: @Shoutout2 FragHYPE is the best 9»3]
    }
    else {
      if ($2 == on) {
        if ($nick == %DJ2) {
          if (%shoutouts2 == off) {
            notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 Shoutouts are already off for Stream-2 9»3] | halt
            set %shoutouts2 on
            notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 You turned the command @shoutout2 on for Stream-2 9»3]
            msg $chan 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 %DJ2 turned the command @shoutouts2 on for Stream-2 9»3]
            halt
          }
        }
      }
      if ($2 == off) {
        if ($nick == %DJ2) {
          if (%shoutouts2 == off) {
            notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 Shoutouts are already off for Stream-2 9»3] | halt
            set %shoutouts2 off
            notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 You turned the command @shoutout2 off for Stream-2 9»3]
            msg $chan 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 %DJ2 turned the command @shoutout2 off for Stream-2 9»3]
            halt
          }
        }
      }
      if (%shoutouts2 == off) {
        notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 This command was turned off by %DJ2 9»3]
        halt
      }
      if (%spam.shoutouts. [ $+ [ $nick ] ] == 1) {
        notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 You can only used this command once every 2 minutes 9»3]
        halt
      }
      else {
        set -u120 %spam.shoutouts. [ $+ [ $nick ] ] 1
        if ($nick == %DJ2) {
          notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 You nimrod, you cant send a shouout to your self 9»3]
        }
        else {
          notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 Your shoutout has been sent to %DJ2 9»3]
          msg %DJ2 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 Shoutout by $nick $+ :  $2- 9»3]
        }
      }
    }
  }
}
on *:TEXT:@requests2*:#paradiseservers:{
  if (!%DJ2) {
    notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 Stream-2 Is Offline, ask a DJ to go on 9»3]
  }
  else {
    if (!$2) {
      notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 You did not submit an actual request 9»3]
      notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 Example: @request %song2 9»3]
    }
    else {
      if ($2 == on) {
        if ($nick == %DJ2) {
          if (%requests2 == on) {
            notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 requests are already on 9»3] | halt
            set %requests2 on
            notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 You turned the command @request on 9»3]
            msg $chan 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 %DJ2 turned the command @request on 9»3]
            halt
          }
        }
      }
    }
    if ($2 == off) {
      if ($nick == %DJ2) {
        if (%requests2 == off) {
          notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 requests are already off 9»3] | halt
          set %requests2 off
          notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 You turned the command @request off 9»3]
          msg $chan 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 %DJ2 turned the command @request off 9»3]
          halt
        }
      }
    }
  }
  if (%requests2 == off) {
    notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 This command was turned off by %DJ2 9»3]
    halt
  }
  if (%spam.request. [ $+ [ $nick ] ] == 1) {
    notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 You can only used this command once every 2 minutes 9»3]
    halt
  }
  else {
    set -u120 %spam.request. [ $+ [ $nick ] ] 1
    if ($nick == %DJ2) {
      notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 You nimrod, you cant send a request to your self 9»3]
    }
    else {
      notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 Your request has been sent to %DJ2 9»3]
      msg %DJ2 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 Request by $nick $+ : $2- 9»3]
    }
  }
}

on *:TEXT:@cut2*:#paradiseservers:{
  if (!%DJ2) {
    notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 Stream-2 Is Offline, ask a DJ to go on 9»3]
  }
  else {
    if ($2 == on) {
      if ($nick == %DJ2) {
        if (%cuts2 == on) {
          notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 cuts are already on 9»3] | halt
          set %cuts2 on
          notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 You turned the command @cut on 9»3]
          msg $chan 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 %DJ2 turned the command @cut on 9»3]
          halt
        }
      }
      elseif ($2 == off) {
        if ($nick == %DJ2) {
          if (%cuts2 == off) {
            notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 cuts are already off 9»3] | halt
            set %cuts2 off
            notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 You turned the command @cut off 9»3]
            msg $chan 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 %DJ2 turned the command @cut off 9»3]
            halt
          }
        }
      }
      else {
        if (%cuts2 == off) {
          notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 This command was turned off by %DJ2 9»3]
          halt
        }
        if (%spam.cuts. [ $+ [ $nick ] ] == 1) {
          notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 You can only used this command once every 2 minutes 9»3]
          halt
        }
        else {
          set -u120 %spam.cuts. [ $+ [ $nick ] ] 1
          if ($nick == %DJ2) {
            notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 You can't cut your song 9»3]
          }
          else {
            notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 Your cut request has been sent to %DJ2 9»3]
            msg %DJ2 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 Request to cut the song has been sent by $nick 9»3]
          }
        }
      }
    }
  }
}


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;@stream Command
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

on *:TEXT:@streaminfo:#paradiseservers:{
  if ($nick >= 200) {
    notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 Stream-1: 216.32.81.114:7000 Password: THESTREAM1password 9»3][9«15 Stream-2: 216.32.81.114:9000 Password: THESTREAM2password 9»3]
  }
}
on *:TEXT:@streams:#paradiseservers:{
  msg $chan 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 @stream1 and @stream2 for more info! 9»3][9«15,1 Stream-1: http:// $+ %serverip1 $+ : $+ %port1 $+ /listen.pls 9»3][9«15,1 Stream-2: http:// $+ %serverip2 $+ : $+ %port2 $+ /listen.pls 9»3]
}


on *:TEXT:@Stream1*:#paradiseservers:{
  if (%DJ1) {
    sockclose server1
    sockopen server1 %serverip1 %port1
  }
  else {
    msg %radiochan 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 Stream-1 Is 4OFFLINE15,1, ask a DJ to go on 9»3]
  }
}

on *:SOCKOPEN:server1: {
  sockwrite -n $sockname GET /7.html HTTP/1.0
  sockwrite -n $sockname User-Agent: Mozilla
  sockwrite -n $sockname $crlf
}
on *:sockread:server1: {
  if ($sockerr > 0) {
    msg %radiochan 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 Stream-1 is 4OFFLINE15,1, ask a DJ to go on 9»3]
    return
  }
  :nextread
  sockread -f %scasttemp1
  if ($sockbr == 0) return
  if (%scasttemp1 == $null) %scasttemp1 = empty
  set %scasttemp1 $remove(%scasttemp1,<HTML><meta http-equiv="Pragma" content="no-cache"></head><body>,</body></html>)
  if ((HTTP/1.* !iswm %scasttemp1) && (content-type* !iswm %scasttemp1) && (%scasttemp1 != empty)) {
    set %status1 $gettok(%scasttemp1,2,44)    
    set %asong $gettok(%scasttemp1,7-,44)
    set %listeners1 $gettok(%scasttemp1,1,44)
    set %peak1 $gettok(%scasttemp1,3,44)
    set %song1 $replace(%asong,&,$chr(38),',$chr(39))
  }
  goto nextread
}
on *:sockclose:server1:{
  if (%status1 == 0) {
    msg %radiochan 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 Stream-1 is 4OFFLINE15,1, ask a DJ to go on 9»3]
  }
  else {
    msg %radiochan 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 Stream-1: http:// $+ %serverip1 $+ : $+ %port1 $+ /listen.pls × OnAir: %DJ1 9»3]
    msg %radiochan 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 Now Playing: %song1 × Listeners: %listeners1 $+ /250 × Peak: %peak1 9»3]
  }
}

on *:TEXT:@Stream2*:#paradiseservers:{
  if (%DJ2) {
    sockclose server2
    sockopen server2 %serverip2 %port2
  }
  else {
    msg %radiochan 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 Stream-2 Is 4OFFLINE15,1, ask a DJ to go on 9»3]
  }
}

on *:SOCKOPEN:server2:{
  sockwrite -n $sockname GET /7.html HTTP/1.0
  sockwrite -n $sockname User-Agent: Mozilla
  sockwrite -n $sockname $crlf
}
on *:sockread:server2:{
  if ($sockerr > 0) {
    msg %radiochan 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 Stream-2 is 4OFFLINE15,1, ask a DJ to go on 9»3]
    return
  }
  :nextread
  sockread -f %scasttemp2
  if ($sockbr == 0) return
  if (%scasttemp2 == $null) %scasttemp2 = empty
  set %scasttemp2 $remove(%scasttemp2,<HTML><meta http-equiv="Pragma" content="no-cache"></head><body>,</body></html>)
  if ((HTTP/1.* !iswm %scasttemp2) && (content-type* !iswm %scasttemp2) && (%scasttemp2 != empty)) {
    set %status2 $gettok(%scasttemp2,2,44)    
    set %asong2 $gettok(%scasttemp2,7-,44)
    set %listeners2 $gettok(%scasttemp2,1,44)
    set %peak2 $gettok(%scasttemp2,3,44)
    set %song2 $replace(%asong2,&,$chr(38),',$chr(39))
  }
  goto nextread
}
on *:sockclose:server2:{
  if (%status2 == 0) {
    msg %radiochan 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 Stream-2 is 4OFFLINE15,1, ask a DJ to go on 9»3]
  }
  else {
    msg %radiochan 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 Stream-2: http:// $+ %serverip2 $+ : $+ %port2 $+ /listen.pls × OnAir: %DJ2 9»3]
    msg %radiochan 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 Now Playing: %song2 × Listeners: %listeners2 $+ /250 × Peak: %peak2 9»3]
  }
}

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;@server Command
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

on *:TEXT:@song1:#paradiseservers:{
  if (!%DJ1) { msg $chan 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 Stream-1 is 4OFFLINE15,1, ask a DJ to go on 9»3] | halt }
  sockclose song1
  sockopen song1 %serverip1 %port1
}
on *:SOCKOPEN:song1:{
  sockwrite -n $sockname GET /7.html HTTP/1.0
  sockwrite -n $sockname User-Agent: Mozilla
  sockwrite -n $sockname $crlf
}
on *:sockread:song1:{
  if ($sockerr > 0) return
  :nextread
  sockread -f %scasttemp1
  if ($sockbr == 0) return
  if (%scasttemp1 == $null) %scasttemp1 = empty
  set %scasttemp1 $remove(%scasttemp1,<HTML><meta http-equiv="Pragma" content="no-cache"></head><body>,</body></html>)
  if ((HTTP/1.* !iswm %scasttemp1) && (content-type* !iswm %scasttemp1) && (%scasttemp1 != empty)) {
    set %status1 $gettok(%scasttemp1,2,44)    
    set %asong1 $gettok(%scasttemp1,7-,44)
    set %listeners1 $gettok(%scasttemp1,1,44)
    set %peak1 $gettok(%scasttemp1,3,44)
    set %song1 $replace(%asong1,&,$chr(38),',$chr(39))
  }
  goto nextread
}
on *:sockclose:song1:{
  if (%status1 == 0) {
    msg %radiochan 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 Stream-1 is 4OFFLINE15,1, ask a DJ to go on 9»3]
  }
  else {
    msg %radiochan 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 Now Playing: %song1 9»3]
  }
}

on *:TEXT:@song2:#paradiseservers:{
  if (!%DJ2) { msg $chan 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 Stream-2 is 4OFFLINE15,1, ask a DJ to go on 9»3] | halt }
  sockclose song2
  sockopen song2 %serverip2 %port2
}
on *:SOCKOPEN:song2:{
  sockwrite -n $sockname GET /7.html HTTP/1.0
  sockwrite -n $sockname User-Agent: Mozilla
  sockwrite -n $sockname $crlf
}
on *:sockread:song2:{
  if ($sockerr > 0) return
  :nextread
  sockread -f %scasttemp2
  if ($sockbr == 0) return
  if (%scasttemp2 == $null) %scasttemp2 = empty
  set %scasttemp2 $remove(%scasttemp2,<HTML><meta http-equiv="Pragma" content="no-cache"></head><body>,</body></html>)
  if ((HTTP/1.* !iswm %scasttemp2) && (content-type* !iswm %scasttemp2) && (%scasttemp2 != empty)) {
    set %status2 $gettok(%scasttemp2,2,44)    
    set %asong2 $gettok(%scasttemp2,7-,44)
    set %listeners2 $gettok(%scasttemp2,1,44)
    set %peak2 $gettok(%scasttemp2,3,44)
    set %song2 $replace(%asong2,&,$chr(38),',$chr(39))
  }
  goto nextread
}
on *:sockclose:song2:{
  if (%status2 == 0) {
    msg %radiochan 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 Stream-2 is 4OFFLINE15,1, ask a DJ to go on 9»3]
  }
  else {
    msg %radiochan 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 Now Playing: %song2 9»3]
  }
}


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;@listeners Command
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

on *:TEXT:@listeners:#paradiseservers:{
  if (!%DJ2) { msg $chan 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 Stream-2 Is 4OFFLINE15,1, ask a DJ to go on 9»3] | halt }
  sockclose listeners2
  sockopen listeners2 %serverip2 %port2
  if (!%DJ1) { msg $chan 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 Stream-1 Is 4OFFLINE15,1, ask a DJ to go on 9»3] | halt }
  sockclose listeners1
  sockopen listeners1 %serverip1 %port1

}

on *:TEXT:@listeners1:#paradiseservers:{
  if (!%DJ1) { msg $chan 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 Stream-1 Is 4OFFLINE15,1, ask a DJ to go on 9»3] | halt }
  sockclose listeners1
  sockopen listeners1 %serverip1 %port1
}
on *:SOCKOPEN:listeners1:{
  sockwrite -n $sockname GET /7.html HTTP/1.0
  sockwrite -n $sockname User-Agent: Mozilla
  sockwrite -n $sockname $crlf
}
on *:sockread:listeners1:{
  if ($sockerr > 0) return
  :nextread
  sockread -f %scasttemp1
  if ($sockbr == 0) return
  if (%scasttemp1 == $null) %scasttemp1 = empty
  set %scasttemp1 $remove(%scasttemp1,<HTML><meta http-equiv="Pragma" content="no-cache"></head><body>,</body></html>)
  if ((HTTP/1.* !iswm %scasttemp1) && (content-type* !iswm %scasttemp1) && (%scasttemp1 != empty)) {
    set %status1 $gettok(%scasttemp1,2,44)    
    set %asong1 $gettok(%scasttemp1,7-,44)
    set %listeners1 $gettok(%scasttemp1,1,44)
    set %peak1 $gettok(%scasttemp1,3,44)
    set %song1 $replace(%asong1,&,$chr(38),',$chr(39))
  }
  goto nextread
}
on *:sockclose:listeners1:{
  if (%status1 == 0) {
    msg %radiochan 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 Stream-1 is 4OFFLINE15,1, ask a DJ to go on 9»3]
  }
  else {
    msg %radiochan 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 Listeners on Stream-1: %listeners1 $+ /250 9»3]
  }
}

on *:TEXT:@listeners2:#paradiseservers:{
  if (!%DJ2) { msg $chan 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 Stream-2 Is 4OFFLINE15,1, ask a DJ to go on 9»3] | halt }
  sockclose listeners2
  sockopen listeners2 %serverip2 %port2
}
on *:SOCKOPEN:listeners2:{
  sockwrite -n $sockname GET /7.html HTTP/1.0
  sockwrite -n $sockname User-Agent: Mozilla
  sockwrite -n $sockname $crlf
}
on *:sockread:listeners2:{
  if ($sockerr > 0) return
  :nextread
  sockread -f %scasttemp2
  if ($sockbr == 0) return
  if (%scasttemp2 == $null) %scasttemp2 = empty
  set %scasttemp2 $remove(%scasttemp2,<HTML><meta http-equiv="Pragma" content="no-cache"></head><body>,</body></html>)
  if ((HTTP/1.* !iswm %scasttemp2) && (content-type* !iswm %scasttemp2) && (%scasttemp2 != empty)) {
    set %status2 $gettok(%scasttemp2,2,44)    
    set %asong2 $gettok(%scasttemp2,7-,44)
    set %listeners2 $gettok(%scasttemp2,1,44)
    set %peak2 $gettok(%scasttemp2,3,44)
    set %song2 $replace(%asong2,&,$chr(38),',$chr(39))
  }
  goto nextread
}
on *:sockclose:listeners2:{
  if (%status2 == 0) {
    msg %radiochan 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 Stream-2 is 4OFFLINE15,1, ask a DJ to go on 9»3]
  }
  else {
    msg %radiochan 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 Listeners on Stream-2: %listeners2 $+ /250 9»3]
  }
}


;;;;;;;;;;;;;;;;;;;;;;;;;;
;override commands
;;;;;;;;;;;;;;;;;;;;;;;;;;
on *:TEXT:@override command*:#paradiseservers:{
  if ($ulevel < 349) {
    notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 Sorry, you do not have access to this command 9»3]
  }
  if ($ulevel >= 350) {
    notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 @override1 and @override2 -requests [on,off] offair onair [nick] shoutout [on,off] cut [on,off]-
  }
}

on *:TEXT:@override1*:#paradiseservers:{
  if ($ulevel < 349) {
    notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 Sorry, you do not have access to this command 9»3]
  }
  if ($ulevel >= 350) {
    if (!$2) {
      notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 Please choose a actual override command 9»3]
      notice $nick 3,1[9« 15Example 9»3][9«15,1 "@override commands" for more info 9»3]
      halt
    }
    if ($2- == requests on) {
      if (%requests1 == off) {
        set %requests1 on
        msg $chan 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 $nick turned on @requests 9»3]
      }
      else notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 @Request for Stream-1 was already on 9»3]
    }
    if ($2- == requests off) {
      if (%requests1 == on) {
        set %requests1 off
        msg $chan 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 $nick turned on @requests 9»3]
      }
      else notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 @Request for Stream-1 was already off 9»3]
    }
    if ($2- == offair) {
      if (%DJ1) {
        set %requests1 on
        set %shoutouts1 on
        set %cuts1 on
        notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 %DJ1 is now off air. Commanded by $nick 9»3]
        msg $chan 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 %DJ1 is now off air. Commanded by $nick 9»3]
        unset %DJ1
      }
      else notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 No DJ online right now 9»3]
    }
    if ($2 == onair) {
      if ($3 == %DJ1) {
        notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 %DJ1 is is already on air 9»3]
        halt
      }
      if (!%DJ1) {
        set %DJ1 $3
        amsg 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 %DJ1 is now on Stream-1. Commanded by $nick 9»3]
      }
    }
    if ($2- == shoutout on) {
      if (%shoutouts1 == off) {
        set %shoutouts1 on
        msg $chan 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 $nick turned on @request for Stream-1 9»3]
      }
      else notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 @shoutout for Stream-1 was already on 9»3]
    }
    if ($2- == shoutout off) {
      if (%shoutouts1 == on) {
        set %shoutouts1 off
        msg $chan 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 $nick turned off @shoutout for Stream-1 9»3]
      }
      else notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 @shoutout for Stream-1 was already off 9»3]
    }
    if ($2- == cut on) {
      if (%cuts1 == off) {
        set %cuts1 on
        msg $chan 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 $nick turned on @cut for Stream-1 9»3]
      }
      else notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 @cut for Stream-1 was already on 9»3]
    }
    if ($2- == cut off) {
      if (%cuts1 == on) {
        set %cuts1 off
        msg $chan 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 $nick turned off @cut 9»3]
      }
      else notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 @cut for Stream-1 was already off 9»3]
    }
  }
}


on *:TEXT:@override2*:#paradiseservers:{
  if ($ulevel < 349) {
    notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 Sorry, you do not have access to this command 9»3]
  }
  if ($ulevel >= 350) {
    if (!$2) {
      notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 Please choose a actual override command 9»3]
      notice $nick 3,1[9« 15Example 9»3][9«15,1 "@override commands" for more info 9»3]
      halt
    }
    if ($2- == requests on) {
      if (%requests2 == off) {
        set %requests2 on
        msg $chan 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 $nick turned on @requests 9»3]
      }
      else notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 @Request for Stream-2 was already on 9»3]
    }
    if ($2- == requests off) {
      if (%requests2 == on) {
        set %requests2 off
        msg $chan 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 $nick turned on @requests 9»3]
      }
      else notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 @Request for Stream-2 was already off 9»3]
    }
    if ($2- == offair) {
      if (%DJ2) {
        set %requests2 on
        set %shoutouts2 on
        set %cuts2 on
        notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 %DJ2 is now off air. Commanded by $nick 9»3]
        msg $chan 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 %DJ2 is now off air. Commanded by $nick 9»3]
        unset %DJ2
      }
      else notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 No DJ online right now 9»3]
    }
    if ($2- == onair) {
      if ($3 == %DJ2) {
        notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 %DJ2 is is already on air 9»3]
        halt
      }
      if (!%DJ2) {
        set %DJ2 $3
        amsg 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 %DJ2 is now on Stream-2. Commanded by $nick 9»3]
      }
    }
    if ($2- == shoutout on) {
      if (%shoutouts2 == off) {
        set %shoutouts2 on
        msg $chan 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 $nick turned on @request for Stream-2 9»3]
      }
      else notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 @shoutout for Stream-2 was already on 9»3]
    }
    if ($2- == shoutout off) {
      if (%shoutouts2 == on) {
        set %shoutouts2 off
        msg $chan 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 $nick turned off @shoutout for Stream-2 9»3]
      }
      else notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 @shoutout for Stream-2 was already off 9»3]
    }
    if ($2- == cut on) {
      if (%cuts2 == off) {
        set %cuts2 on
        msg $chan 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 $nick turned on @cut for Stream-2 9»3]
      }
      else notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 @cut for Stream-2 was already on 9»3]
    }
    if ($2- == cut off) {
      if (%cuts2 == on) {
        set %cuts2 off
        msg $chan 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 $nick turned off @cut 9»3]
      }
      else notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 @cut for Stream-2 was already off 9»3]
    }
  }
}



;;;;;;;;;;;;;;;
;;QueryScript;;
;;;;;;;;;;;;;;;

on *:TEXT:*:?:{
  if ($nick == %DJ1) || ($nick == %DJ2) { closemsg $nick }
  else msg #paradiseservers.staff $nick PMed me: $1-
  closemsg $nick
}

;;;;;;;;
;;HELP;;
;;;;;;;;

on *:TEXT:@HELP*:#:{
  if ($ulevel >= 150) { halt }
  if ($2 == $null) { notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 @help [THE THING YOU NEED HELP ON] 9»3]
    else {
      msg #paradiseservers.staff 3,1-
      msg #paradiseservers.staff 3,1-------------------------------
      msg #paradiseservers.staff 3,1--15Nick: $nick
      msg #paradiseservers.staff 3,1--15Date: $date(dddd mmmm dd $+ $chr(44) yyyy)
      msg #paradiseservers.staff 3,1--15Time: $asctime(hh:nn:ss TT)
      msg #paradiseservers.staff 3,1--15Channel: $chan
      msg #paradiseservers.staff 3,1--15Message: $2-
      msg #paradiseservers.staff 3,1-------------------------------
      msg #paradiseservers.staff 3,1-
      msg $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 The Staff Has Been Paged 9»3]
    }
  }
}

;;;;;;;;;;;;
;;addstaff;;
;;;;;;;;;;;;

on *:TEXT:@addstaff*:#paradiseservers:{
  if ($nick >= 400) {
    if (!$2) {
      notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 You need to set a level 9»3]
      notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 Example: @addstaff8 50015 $nick CEO 9»3]
      halt
    }
    if (!$3) {
      notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 You need to set a nick 9»3]
      notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 Example: @addstaff 500 8$nick15 CEO 9»3]
      halt
    }
    if (!$4) {
      notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 You need to set info 9»3]
      notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 Example: @addstaff 500 $nick 8CEO15 9»3]
      halt
    }
    if ($2 >= 300) {
      set %setlevel 350
    }
    else {
      set %setlevel 250
    }
    guser $2 $3 2 $4-
    msg ChanServ #paradiseservers adduser $3 %setlevel
    msg ChanServ #paradiseservers.staff adduser $3 200
    msg ChanServ #paradiseservers resync
    msg ChanServ #paradiseservers.staff resync
    notice $3 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 You have been added to the staff channel 9»3]
    notice $3 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 Put the following commands in your preform section 9»3]
    notice $3 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 /cs inviteme #paradiseservers.staff 9»3]
    notice $3 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 /j #paradiseservers.staff 9»3]
    notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 $3 has been added to the staff channel and FragHYPE channel 9»3]
  }
}
;;;;;;;;;;;;;;;;
;;deletedstaff;;
;;;;;;;;;;;;;;;;

on *:TEXT:@deletestaff*:#paradiseservers:{
  if ($ulevel >= 400) {
    if (!$2) {
      notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 You need to add a nick 9»3]
      notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 Example: @deletestaff 8$nick 9»3]
      halt
    }
    ruser $2 2
    msg ChanServ #paradiseservers deluser $2
    msg ChanServ #paradiseservers.staff deluser $2
    msg ChanServ #paradiseservers.staff kick $2
    notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 $2 has been deleted from all the staff 9»3]
  }
}
;;;;;;;;;;;;;;
;;DJcommands;;
;;;;;;;;;;;;;;

on *:TEXT:@DJcommands:#: {
  if ($ulevel < 199) {
    notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 Sorry you do not have permission to access this command 9»3]
    halt
  }
  if ($ulevel >= 199) {
    notice $nick 3,1[9« 15#paradiseservers 9»3]
    notice $nick 3,1[9« 15Requests - @request1/2 on/off 9»3]
    notice $nick 3,1[9« 15Shoutouts - @shoutout1/2 on/off 9»3]
    notice $nick 3,1[9« 15Cuts - @cut1/2 on/off 9»3]
    notice $nick 3,1[9« 15Onair - @Onair1/2 9»3]
    notice $nick 3,1[9« 15Offair - @offair1/2 9»3]
    notice $nick 3,1[9« 15#paradiseservers 9»3]
  }
}
;;;;;;;;;;;;;;;;;;;
;;managercommands;;
;;;;;;;;;;;;;;;;;;;

on *:TEXT:@managercommands:#paradiseservers:{
  if ($ulevel < 150) {
    notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9« 15,1 Sorry you do not have permission to access this command 9»3]
    halt
  }
  if ($ulevel > 199) {
    notice $nick 3,1[9« 15#paradiseservers 9»3]
    notice $nick 3,1[9« 15Override Requests - @override requests on/off 9»3]
    notice $nick 3,1[9« 15Override Shoutouts - @override shoutouts on/off 9»3]
    notice $nick 3,1[9« 15Override Cuts - @override cut on/off 9»3]
    notice $nick 3,1[9« 15Override Offair - @override offair 9»3]
    notice $nick 3,1[9« 15#paradiseservers 9»3]
  }
}

;;;;;;;;;;;;;;;;;
;;ownercommands;;
;;;;;;;;;;;;;;;;;

on *:TEXT:@ownercommands:#paradiseservers:{
  if ($ulevel < 400) {
    notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9« 15,1 Sorry you do not have permission to access this command 9»3]
    halt
  }
  if ($ulevel >= 400) {
    notice $nick 3,1[9« 15#paradiseservers 9»3]
    notice $nick 3,1[9« 15Add Staff - @staff add/delete 9»3]
    notice $nick 3,1[9« 15Add Sponsors - @sponsor add/delete 9»3]
    notice $nick 3,1[9« 15Add Custom - @custom add/delete 9»3]
    notice $nick 3,1[9« 15Bot Channels - @channel add/delete 9»3]
    notice $nick 3,1[9« 15#paradiseservers 9»3]
  }
}
;;;;;;;;;
;;power;;
;;;;;;;;;

on 400:TEXT:@power:#: {
  set %chanpower $chan
  pwr
}
alias pwr {
  var %s = $scon(0),%g = 1
  while (%g <= %s) {
    scid $scon(%g)
    var %f = $chan(0),%opped,%voiced,%total
    inc %total $chan(0)
    while (%f) {
      if ($me isop $chan(%f)) {
        inc %opped
      }
      elseif ($me isvoice $chan(%f)) {
        inc %voiced
      }
      dec %f
      var %regular = $calc(%total - (%opped + %voiced))
    }
    inc %g
    scid -r
    msg %chanpower 3,1[9« 15Paradise3SERVERS 9»3]
    msg %chanpower 3,1[9« 15Total Channels 3,1[9«15 %total 9»3]
    msg %chanpower 3,1[9« 15Opped Status 3,1[9«15 %opped 9»3]
    msg %chanpower 3,1[9« 15Voiced Status 3,1[9«15 %voiced 9»3]
    msg %chanpower 3,1[9« 15Regular Status 3,1[9«15 %regular 9»3]
    msg %chanpower 3,1[9« 15Paradise3SERVERS 9»3]
  }
}

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;timer Command
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

on *:SOCKOPEN:timer1:{
  sockwrite -n $sockname GET /7.html HTTP/1.0
  sockwrite -n $sockname User-Agent: Mozilla
  sockwrite -n $sockname $crlf
}
on *:sockread:timer1:{
  if ($sockerr > 0) {
    msg $chan 3,1[9« 15Paradise3SERVERS 9»3][9« 15,1 Stream-1 is 4OFFLINE15,1, ask a DJ to go on 9»3]
    return
  }
  :nextread
  sockread -f %scasttemp1
  if ($sockbr == 0) return
  if (%scasttemp1 == $null) %scasttemp1 = empty
  set %scasttemp1 $remove(%scasttemp1,<HTML><meta http-equiv="Pragma" content="no-cache"></head><body>,</body></html>)
  if ((HTTP/1.* !iswm %scasttemp1) && (content-type* !iswm %scasttemp1) && (%scasttemp1 != empty)) {
    set %tstatus1 $gettok(%scasttemp1,2,44)    
    set %tasong1 $gettok(%scasttemp1,7-,44)
    set %tlisteners1 $gettok(%scasttemp1,1,44)
    set %tpeak1 $gettok(%scasttemp1,3,44)
    set %tsong1 $replace(%asong1,&,$chr(38),',$chr(39))
  }
  goto nextread
}
on *:sockclose:timer1:{
  if (%status1 == 0) {
    msg $chan 3,1[9« 15Paradise3SERVERS 9»3][9« 15,1 Stream-1 is 4OFFLINE15,1, ask a DJ to go on 9»3]
  }
  else {
    notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 Stream-1: http:// $+ %serverip1 $+ : $+ %port1 $+ /listen.pls 9»3][9« OnAir: %DJ1 8)
    notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 Now Playing: %tsong1 9»3][9« Listeners: %tlisteners1 $+ /250 9»3][9« Peak: %tpeak1 9»3]
  }
}

on *:SOCKOPEN:timer2:{
  sockwrite -n $sockname GET /7.html HTTP/1.0
  sockwrite -n $sockname User-Agent: Mozilla
  sockwrite -n $sockname $crlf
}
on *:sockread:timer2:{
  if ($sockerr > 0) {
    msg $chan 3,1[9« 15Paradise3SERVERS 9»3][9« 15,1 Stream-2 is 4OFFLINE15,1, ask a DJ to go on 9»3]
    return
  }
  :nextread
  sockread -f %scasttemp2
  if ($sockbr == 0) return
  if (%scasttemp2 == $null) %scasttemp2 = empty
  set %scasttemp2 $remove(%scasttemp2,<HTML><meta http-equiv="Pragma" content="no-cache"></head><body>,</body></html>)
  if ((HTTP/1.* !iswm %scasttemp2) && (content-type* !iswm %scasttemp2) && (%scasttemp2 != empty)) {
    set %tstatus2 $gettok(%scasttemp2,2,44)    
    set %tasong2 $gettok(%scasttemp2,7-,44)
    set %tlisteners2 $gettok(%scasttemp2,1,44)
    set %tpeak2 $gettok(%scasttemp2,3,44)
    set %tsong2 $replace(%asong2,&,$chr(38),',$chr(39))
  }
  goto nextread
}
on *:sockclose:timer2:{
  if (%status2 == 0) {
    msg $chan 3,1[9« 15Paradise3SERVERS 9»3][9« 15,1 Stream-2 is 4OFFLINE15,1, ask a DJ to go on 9»3]
  }
  else {
    notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 Stream-2: http:// $+ %serverip2 $+ : $+ %port2 $+ /listen.pls 9»3][9« OnAir: %DJ2 9»3]
    notice $nick 3,1[9« 15Paradise3SERVERS 9»3][9«15,1 Now Playing: %tsong2 9»3][9« Listeners: %tlisteners2 $+ /250 9»3][9« Peak: %tpeak2 9»3]
  }
}