All pastes #827860 Raw Edit

Kurupt.Radio v1.1

public text v1 · immutable
#827860 ·published 2007-12-22 01:49 UTC
rendered paste body
on *:load:{
  set %channel #Kurupt.Radio
  set %serverip1 68.104.214.32
  set %serverip2 64.46.36.178
  set %port1 8000
  set %port2 8002
}
on *:JOIN:%channel {
  if ($nick == !$me) {
    notice $nick $skin(start) 0#Kurupt.Radio $skin(mid) Welcome to %channel Where we bring music to you 24/7 $skin(end)
    notice $nick $skin(start) 0#Kurupt.Radio $skin(mid) Type @Commands to see a list of commands $skin(end)
    ;msg $chan $skin(start) 0#Kurupt.Radio $skin(mid) If you want the bot in your channel type @apply $skin(end)
  }
  if ($ulevel >= 100) {
    var %info $ulist($address($nick,1),$ulevel,1).info
    msg $chan $skin(start) 0#Kurupt.Radio $skin(mid) $nick $+ , is %info $skin(end)
  }
}
on *:NICK:#Kurupt.Radio {
  if ($nick == %dj) {
    set %dj $newnick
    amsg $skin(start) 0#Kurupt.Radio $skin(mid) DJ` $+ $nick changed his name to $newnick $skin(end)
  }
}
on *:TEXT:@commands:#Kurupt.Radio {
  msg $chan $skin(start) 0#Kurupt.Radio $skin(end)
  msg $chan $skin(start) 0Stream - @stream $skin(mid) 0Song - @song $skin(mid) 0Listeners - @listeners $skin(mid) 0Dj - @dj $skin(mid) 0Shoutout - @shoutout $skin(mid) 0Request - @request $skin(mid) 0Cut - @cut $skin(end)
  ;msg $chan $skin(start)  $skin(end)
  ;msg $chan $skin(start)  $skin(end)
  ;msg $chan $skin(start)  $skin(end)
  ;msg $chan $skin(start)  $skin(end)
  ;msg $chan $skin(start)  $skin(end)
  ;msg $chan $skin(start)  $skin(end)
  msg $chan $skin(start) 0#Kurupt.Radio $skin(end)
}
on *:TEXT:@dj:#Kurupt.Radio {
  if (%dj) {
    if ($nick == %dj) {
      notice $nick $skin(start) 0#Kurupt.Radio $skin(mid) Your the dj that is annihilating the radio waves eh? $skin(end)
    }
    else {
      msg $chan $skin(start) 0#Kurupt.Radio $skin(mid) DJ` $+ %dj is on air, annihilating the radio waves $skin(end)
    }
  }
  else {
    msg $chan $skin(start) 0#Kurupt.Radio $skin(mid) Stream-1 Is Offline, Ask a DJ to go on $skin(end)
  }
}
on 200:TEXT:@onair*:#Kurupt.Radio {
  if ($nick == %dj) {
    notice $nick $skin(start) 0#Kurupt.Radio $skin(mid) Your on air already $skin(end)
    halt
  }
  if (%dj) {
    notice $nick $skin(start) 0#Kurupt.Radio $skin(mid) DJ` $+ %dj is on air $skin(end)
    halt
  }  
  if (!%dj) {
    if ($2) {
      set %style $2
    }
    else { 
      set %style Undefined
    }
    set %dj $nick
    msg $chan $skin(start) 0#Kurupt.Radio $skin(mid) DJ` $+ %dj is now on air, annihilating the radio waves $skin(end)
    topic #Kurupt.radio $skin(start) 0#Kurupt.Radio $skin(mid) DJ` $+ %dj is now on air, tune in 15http:// $+ %serverip1 $+ : $+ %port1 $+ /listen.pls $skin(mid) Style:15 %style $skin(end)
  }
}
on 200:TEXT:@autodj:#Kurupt.Radio: {
  if (%dj) {
    notice $nick $skin(start) 0#Kurupt.Radio $skin(mid) DJ` $+ %dj is on air $skin(end)
    halt
  } 
  if (!%dj) {
    set %dj AutoDJ
  }
  msg $chan $skin(start) 0#Kurupt.Radio $skin(mid) %dj is now on air, annihilating the radio waves $skin(end)
  topic #Kurupt.radio $skin(start) 0#Kurupt.Radio $skin(mid) %dj is now on air, tune in 15http:// $+ %serverip1 $+ : $+ %port1 $+ /listen.pls $skin(mid) Style:15 Auto $skin(end)

}
on 200:TEXT:@offair:#Kurupt.Radio {
  if (%dj) {
    if ($nick == %dj) {
      set %requests on
      set %shoutouts on
      set %cuts on
      msg $chan $skin(start) 0#Kurupt.Radio $skin(mid) DJ` $+ %dj is now of air. $skin(end)
      ;amsg $skin(start) 0#Kurupt.Radio $skin(mid) DJ` $+ %dj is now of air. $skin(end)
      topic #Kurupt.radio $skin(start) 0#Kurupt.Radio $skin(mid) No Dj online right now, Ask one to get on $skin(end)
      unset %dj
    }
  }
}
on *:TEXT:@shoutout*:#Kurupt.Radio {
  if (!%dj) {
    msg $chan $skin(start) 0#Kurupt.Radio $skin(mid) Stream Is Offline, Ask a DJ to go on $skin(end)
  }
  else {
    if (!$2) {
      notice $nick $skin(start) 0#Kurupt.Radio $skin(mid) You did not submit an actual shoutout $skin(end)
      msg $chan $skin(start) 0#Kurupt.Radio $skin(mid) Example: @Shoutout Kurupt Radio is the best $skin(end)
    }
    else {
      if ($2 == on) {
        if ($nick == %dj) {
          set %shoutouts on
          notice $nick $skin(start) 0#Kurupt.Radio $skin(mid) You turned the command @shoutout on $skin(end)
          msg $chan $skin(start) 0#Kurupt.Radio $skin(mid) DJ- $+ %dj turned the command @shoutouts on $skin(end)
          halt
        }
      }
      if ($2 == off) {
        if ($nick == %dj) {
          set %shoutouts off
          notice $nick $skin(start) 0#Kurupt.Radio $skin(mid) You turned the command @shoutouts off $skin(end)
          msg $chan $skin(start) 0#Kurupt.Radio $skin(mid) DJ- $+ %dj turned the command @shoutouts off $skin(end)
          halt
        }
      }
      if (%shoutouts == off) {
        msg $chan $skin(start) 0#Kurupt.Radio $skin(mid) This command was turned off by DJ- $+ %dj $skin(end)
        halt
      }
      if (%spam.shoutouts. [ $+ [ $nick ] ] == 1) {
        notice $nick $skin(start) 0#Kurupt.Radio $skin(mid) You can only used this command once every minute $skin(end)
        halt
      }
      else {
        set -u60 %spam.shoutouts. [ $+ [ $nick ] ] 1
        if ($nick == %dj) {
          notice $nick $skin(start) 0#Kurupt.Radio $skin(mid) You nimrod, you cant send a shouout to your self $skin(end)
        }
        else {
          notice $nick $skin(start) 0#Kurupt.Radio $skin(mid) Your shoutout has been sent to DJ- $+ %dj $skin(end)
          msg %dj $skin(start) 0#Kurupt.Radio $skin(mid) Shoutout by $nick $+ :  $2- $skin(end)
        }
      }
    }
  }
}
on *:TEXT:@request*:#Kurupt.Radio {
  if (!%dj) {
    msg $chan $skin(start) 0#Kurupt.Radio $skin(mid) Stream Is Offline, Ask a DJ to go on $skin(end)
  }
  else {
    if (!$2) {
      notice $nick $skin(start) 0#Kurupt.Radio $skin(mid) You did not submit an actual request $skin(end)
      notice $nick $skin(start) 0#Kurupt.Radio $skin(mid) Example: @request %song1 $skin(end)
    }
    else {
      if ($2 == on) {
        if ($nick == %dj) {
          set %requests on
          notice $nick $skin(start) 0#Kurupt.Radio $skin(mid) You turned the command @request on $skin(end)
          msg $chan $skin(start) 0#Kurupt.Radio $skin(mid) DJ- $+ %dj turned the command @request on $skin(end)
          halt
        }
      }
      if ($2 == off) {
        if ($nick == %dj) {
          set %requests off
          notice $nick $skin(start) 0#Kurupt.Radio $skin(mid) You turned the command @request off $skin(end)
          msg $chan $skin(start) 0#Kurupt.Radio $skin(mid) DJ- $+ %dj turned the command @request off $skin(end)
          halt
        }
      }
      if (%requests == off) {
        msg $chan $skin(start) 0#Kurupt.Radio $skin(mid) This command was turned off by DJ- $+ %dj $skin(end)
        halt
      }
      if (%spam.request. [ $+ [ $nick ] ] == 1) {
        msg $chan $skin(start) 0#Kurupt.Radio $skin(mid) You can only used this command once every minute $skin(end)
        halt
      }
      else {
        set -u60 %spam.request. [ $+ [ $nick ] ] 1
        if ($nick == %dj) {
          notice $nick $skin(start) 0#Kurupt.Radio $skin(mid) You nimrod, you cant send a request to your self $skin(end)
        }
        else {
          notice $nick $skin(start) 0#Kurupt.Radio $skin(mid) Your request has been sent to DJ- $+ %dj $skin(end)
          msg %dj $skin(start) 0#Kurupt.Radio $skin(mid) Request by $nick $+ :  $2- $skin(end)
        }
      }
    }
  }
}
on *:TEXT:@cut*:#Kurupt.Radio {
  if (!%dj) {
    msg $chan $skin(start) 0#Kurupt.Radio $skin(mid) Stream Is Offline, Ask a DJ to go on $skin(end)
  }
  else {
    if ($2 == on) {
      if ($nick == %dj) {
        set %cuts on
        msg $chan $skin(start) 0#Kurupt.Radio $skin(mid) You turned the command @cut on $skin(end)
        msg $chan $skin(start) 0#Kurupt.Radio $skin(mid) DJ- $+ %dj turned the command @cut on $skin(end)
        halt
      }
    }
    elseif ($2 == off) {
      if ($nick == %dj) {
        set %cuts off
        msg $chan $skin(start) 0#Kurupt.Radio $skin(mid) You turned the command @cut off $skin(end)
        msg $chan $skin(start) 0#Kurupt.Radio $skin(mid) DJ- $+ %dj turned the command @cut off $skin(end)
        halt
      }
    }
    else {
      if (%cuts == off) {
        msg $chan $skin(start) 0#Kurupt.Radio $skin(mid) This command was turned off by DJ- $+ %dj $skin(end)
        halt
      }
      if (%spam.cuts. [ $+ [ $nick ] ] == 1) {
        msg $chan $skin(start) 0#Kurupt.Radio $skin(mid) You can only used this command once every minute $skin(end)
        halt
      }
      else {
        set -u60 %spam.cuts. [ $+ [ $nick ] ] 1
        if ($nick == %dj) {
          msg $chan $skin(start) 0#Kurupt.Radio $skin(mid) You nimrod, you cant cut your self $skin(end)
        }
        else {
          msg $chan $skin(start) 0#Kurupt.Radio $skin(mid) Your cut request has been sent to DJ- $+ %dj $skin(end)
          msg %dj $skin(start) 0#Kurupt.Radio $skin(mid) Request to cut the song has been sent by $nick $skin(end)
        }
      }
    }
  }
}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;@server Command
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;



on *:TEXT:@stream:#Kurupt.Radio:{
  if (%dj) {
    set %ask.nick $nick
    set %ask.chan $chan
    sockclose server1
    sockopen server1 %serverip1 %port1
  }
  else {
    msg $chan $skin(start) 0#Kurupt.Radio $skin(mid) Stream Is Offline, Ask a DJ to go on $skin(end)
  }
}
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 %ask.chan $skin(start) 0#Kurupt.Radio $skin(mid) Stream-1 Is Offline, Ask a DJ to go on $skin(end)
    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 %ask.chan $skin(start) 0#Kurupt.Radio $skin(mid) Stream-1 Is Offline, Ask a DJ to go on $skin(end)
  }
  else {
    msg #Kurupt.Radio $skin(start) 0#Kurupt.Radio $skin(mid) Stream-1: http:// $+ %serverip1 $+ : $+ %port1 $+ /listen.pls  DJ: %dj 8)
    msg #Kurupt.Radio $skin(start) 0#Kurupt.Radio $skin(mid) Song: %song1  Listeners: %listeners1 $+ /1337  Peak: %peak1 $skin(end)
  }
}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;@server Command
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;



on *:TEXT:@song:#Kurupt.Radio:{
  if (!%dj) { msg $chan $skin(start) 0#Kurupt.Radio $skin(mid) Stream-1 Is Offline, Ask a DJ to go on $skin(end) | halt }
  set %ask.nick $nick
  set %ask.chan $chan
  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 %ask.chan $skin(start) 0#Kurupt.Radio $skin(mid) Stream-1 Is Offline, Ask a DJ to go on $skin(end)
  }
  else {
    msg #Kurupt.Radio $skin(start) 0#Kurupt.Radio $skin(mid) Song: %song1 $skin(mid) 0#Kurupt.Radio $skin(end)
  }
}



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



on *:TEXT:@listeners:#Kurupt.Radio:{
  if (!%dj) { msg $chan $skin(start) 0#Kurupt.Radio $skin(mid) Stream Is Offline, Ask a DJ to go on $skin(end) | halt }
  set %ask.nick $nick
  set %ask.chan $chan
  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))
    set %bitrate1 $+($gettok(%scasttemp,6,44),Kb/s)
  }
  goto nextread
}
on *:sockclose:listeners1:{
  if (%status1 == 0) {
    msg %ask.chan $skin(start) 0#Kurupt.Radio $skin(mid) Stream-1 Is Offline, Ask a DJ to go on $skin(end)
  }
  else {
    msg #Kurupt.Radio $skin(start) 0#Kurupt.Radio $skin(mid) Listeners: %listeners1 $+ /1337 $skin(end)
  }
}


;;;;;;;;;;;;;;;;;;;;;;;;;;
;override commands
;;;;;;;;;;;;;;;;;;;;;;;;;;

on 400:TEXT:@override*:#Kurupt.Radio {
  if (!$2) {
    msg $chan $skin(start) 0#Kurupt.Radio $skin(mid) Please choose a actuall @override command $skin(end)
    msg $chan $skin(start) 0Example $skin(mid) @override offair $skin(end)
    halt
  }
  if ($2- == requests on) {
    if (%requests == off) {
      set %requests on
      msg $chan $skin(start) 0#Kurupt.Radio $skin(mid) $nick turned on @requests $skin(end)
    }
  }
  if ($2- == requests off) {
    if (%requests == on) {
      set %requests off
      msg $chan $skin(start) 0#Kurupt.Radio $skin(mid) $nick turned on @requests $skin(end)
    }
  }
  if ($2- == shoutout on) {
    if (%shoutouts == off) {
      set %shoutouts on
      msg $chan $skin(start) 0#Kurupt.Radio $skin(mid) $nick turned on @requests $skin(end)
    }
  }
  if ($2- == shoutout off) {
    if (%shoutouts == on) {
      set %shoutouts off
      msg $chan $skin(start) 0#Kurupt.Radio $skin(mid) $nick turned off @shoutout $skin(end)
    }
  }
  if ($2- == cut on) {
    if (%cuts == off) {
      set %cuts on
      msg $chan $skin(start) 0#Kurupt.Radio $skin(mid) $nick turned on @cut $skin(end)
    }
  }
  if ($2- == cut off) {
    if (%cuts == on) {
      set %cuts off
      msg $chan $skin(start) 0#Kurupt.Radio $skin(mid) $nick turned off @cut $skin(end)
    }
  }
  if ($2 == offair) {
    if (%dj) {
      set %requests on
      set %shoutouts on
      set %cuts on
      msg $chan $skin(start) 0#Kurupt.Radio $skin(mid) %dj is now of air. $skin(end)
      ;amsg $skin(start) 0#Kurupt.Radio $skin(mid) DJ` $+ %dj is now of air. $skin(end)
      topic #Kurupt.radio $skin(start) 0#Kurupt.Radio $skin(mid) No Dj online right now, Ask one to get on $skin(end)
      unset %dj
    }
  }
  if ($2 == style) {
    if (!%dj) {
      halt
    }
    if ($3) {
      set %style $3-
      topic #Kurupt.radio $skin(start) 0#Kurupt.Radio $skin(mid) DJ` $+ %dj is now on air, tune in 15http:// $+ %serverip1 $+ : $+ %port1 $+ /listen.pls $skin(mid) Style:15 %style $skin(end)
    }
  }
}
on *:JOIN:#Support:{
  if ($nick == $me) {
    part #Support I am a bot, and was commanded to join, no help required
  }
}

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

on *:OPEN:?: {
  if ($nick == HelpServ) { halt }
  msg $nick $skin(start) 0#Kurupt.Radio $skin(mid) Hello I'm a bot for #Kurupt.Radio $skin(end)
  msg $nick $skin(start) 0#Kurupt.Radio $skin(mid) I will not respond to you, if you need assistance please talk to an op in #Kurupt.Radio $skin(end)
  msg $nick $skin(start) 0#Kurupt.Radio $skin(mid) Conversation is being closed $skin(end)
  closemsg $nick
}
;;;;;;;;
;;HELP;;
;;;;;;;;
on *:TEXT:@HELP*:#Kurupt.Radio {
  if ($ulevel >= 150) {
    halt
  }
  else {
    notice #kr.staff 6,1-
    notice #kr.staff 6,1-------------------------------
    notice #kr.staff 6,1--0Nick: $nick
    notice #kr.staff 6,1--0Date: $date(dddd mmmm dd $+ $chr(44) yyyy)
    notice #kr.staff 6,1--0Time: $asctime(hh:nn:ss TT)
    notice #kr.staff 6,1--0Channel: $chan
    notice #kr.staff 6,1--0Message: $2-
    notice #kr.staff 6,1-------------------------------
    notice #kr.staff 6,1-
    msg $chan $skin(start) 0#Kurupt.Radio $skin(mid) Staff Have Been Paged $skin(end)
  }
}

;;;;;;;;;;;;
;;addstaff;;
;;;;;;;;;;;;
on 400:TEXT:@addstaff*:#Kurupt.Radio {
  if (!$2) {
    msg $chan $skin(start) 0#Kurupt.Radio $skin(mid) You need to set a level $skin(end)
    msg $chan $skin(start) 0#Kurupt.Radio $skin(mid) Example: @addstaff8 5000 $nick CEO $skin(end)
    halt
  }
  if (!$3) {
    msg $chan $skin(start) 0#Kurupt.Radio $skin(mid) You need to set a nick $skin(end)
    msg $chan $skin(start) 0#Kurupt.Radio $skin(mid) Example: @addstaff 500 8$nick0 CEO $skin(end)
    halt
  }
  if (!$4) {
    msg $chan $skin(start) 0#Kurupt.Radio $skin(mid) You need to set info $skin(end)
    msg $chan $skin(start) 0#Kurupt.Radio $skin(mid) Example: @addstaff 500 $nick 8CEO0 $skin(end)
    halt
  }
  if ($2 > 300) {
    set %setlevel 350
  }
  else {
    set %setlevel 250
  }
  guser $2 $3 2 $4-
  msg chanserv #Kurupt.Radio adduser $3 200
  msg chanserv #kr.staff adduser $3 200
  invite $3 #Kr.staff
  msg chanserv #Kurupt.Radio resync
  msg chanserv #kr.staff resync
  notice $3 $skin(start) 0#Kurupt.Radio $skin(mid) You have been added to the staff channel $skin(end)
  notice $3 $skin(start) 0#Kurupt.Radio $skin(mid) Please do the following commands $skin(end)
  notice $3 $skin(start) 0#Kurupt.Radio $skin(mid) /cs #Kr.staff inviteme $skin(end)
  notice $3 $skin(start) 0#Kurupt.Radio $skin(mid) /cs #kr.staff uset autoinvite 1 $skin(end)
  msg $chan $skin(start) 0#Kurupt.Radio $skin(mid) $3 has been added to the staff channel and Kurupt.Radio channel $skin(end)
}
;;;;;;;;;;;;;;;;
;;deletedstaff;;
;;;;;;;;;;;;;;;;

on 400:TEXT:@deletestaff*:#Kurupt.Radio {
  if (!$2) {
    notice $nick $skin(start) 0#Kurupt.Radio $skin(mid) You need to add a nick $skin(end)
    notice $nick $skin(start) 0#Kurupt.Radio $skin(mid) Example: @deletestaff 8$nick $skin(end)
    halt
  }
  ruser $2 2
  msg chanserv #Kurupt.Radio deluser $2
  msg chanserv #kr.staff deluser $2
  msg chanserv #kr.staff kick $2
  msg $chan $skin(start) 0#Kurupt.Radio $skin(mid) $2 has been deleted from all the staff $skin(end)
}
;;;;;;;;;;;;;;
;;djcommands;;
;;;;;;;;;;;;;;

on *:TEXT:@djcommands:#Kurupt.Radio {
  if ($ulevel < 199) {
    notice $nick $skin(start) 0#Kurupt.Radio $skin(mid) Sorry you do not have permission to access this command $skin(end)
    halt
  }
  if ($ulevel > 199) {
    notice $nick $skin(start) 0#Kurupt.Radio $skin(end)
    notice $nick $skin(start) 0Requests - @requests on/off $skin(end)
    notice $nick $skin(start) 0Shoutouts - @shoutouts on/off $skin(end)
    notice $nick $skin(start) 0Cuts - @cut on/off $skin(end)
    notice $nick $skin(start) 0Onair - @onair $skin(end)
    notice $nick $skin(start) 0Offair - @offair $skin(end)
    notice $nick $skin(start) 0#Kurupt.Radio $skin(end)
  }
}
;;;;;;;;;;;;;;;;;;;
;;managercommands;;
;;;;;;;;;;;;;;;;;;;

on *:TEXT:@managercommands:#Kurupt.Radio {
  if ($ulevel < 199) {
    notice $nick $skin(start) 0#Kurupt.Radio $skin(mid) Sorry you do not have permission to access this command $skin(end)
    halt
  }
  if ($ulevel > 199) {
    notice $nick $skin(start) 0#Kurupt.Radio $skin(end)
    notice $nick $skin(start) 0Override Requests - @override requests on/off $skin(end)
    notice $nick $skin(start) 0Override Shoutouts - @override shoutouts on/off $skin(end)
    notice $nick $skin(start) 0Override Cuts - @override cut on/off $skin(end)
    notice $nick $skin(start) 0Override Offair - @override offair $skin(end)
    notice $nick $skin(start) 0#Kurupt.Radio $skin(end)
  }
}

;;;;;;;;;;;;;;
;;mecommands;;
;;;;;;;;;;;;;;

on *:TEXT:@ocommands:#Kurupt.Radio {
  if ($ulevel < 400) {
    notice $nick $skin(start) 0#Kurupt.Radio $skin(mid) Sorry you do not have permission to access this command $skin(end)
    halt
  }
  if ($ulevel > 400) {
    notice $nick $skin(start) 0#Kurupt.Radio $skin(end)
    notice $nick $skin(start) 0Add Staff - @staff add/delete $skin(end)
    notice $nick $skin(start) 0Add Sponsors - @sponsor add/delete $skin(end)
    notice $nick $skin(start) 0Add Custom - @custom add/delete $skin(end)
    notice $nick $skin(start) 0Bot Channels - @channel add/delete $skin(end)
    notice $nick $skin(start) 0#Kurupt.Radio $skin(end)
  }
}
;;;;;;;;;
;;power;;
;;;;;;;;;
on 400:TEXT:@power:#Kurupt.Radio {
  set %channelpower $chan
  pwr
}
alias pwr {
  var %s = $scon(0),%g = 1
  while (%g <= %s) {
    scid $scon(%g)
    var %f = $chan(0),%opped,%voiced,%total
    set %network $network
    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 %channelpower $skin(start) 0#Kurupt.Radio $skin(end)
    msg %channelpower $skin(start) 0Network $skin(mid) %network $skin(end)
    msg %channelpower $skin(start) 0Total Channels $skin(mid) %total $skin(end)
    msg %channelpower $skin(start) 0Opped Status $skin(mid) %opped $skin(end)
    msg %channelpower $skin(start) 0Voiced Status $skin(mid) %voiced $skin(end)
    msg %channelpower $skin(start) 0Regular Status $skin(mid) %regular $skin(end)
    msg %channelpower $skin(start) 0#Kurupt.Radio $skin(end)
  }
  unset %network
}



;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;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 %ask.chan $skin(start) 0#Kurupt.Radio $skin(mid) Stream-1 Is Offline, Ask a DJ to go on $skin(end)
    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 %tasong $gettok(%scasttemp1,7-,44)
    set %tlisteners1 $gettok(%scasttemp1,1,44)
    set %tpeak1 $gettok(%scasttemp1,3,44)
    set %tsong1 $replace(%asong,&,$chr(38),',$chr(39))
  }
  goto nextread
}
on *:sockclose:timer1:{
  if (%status1 == 0) {
    msg %ask.chan $skin(start) 0#Kurupt.Radio $skin(mid) Stream-1 Is Offline, Ask a DJ to go on $skin(end)
  }
  else {
    notice %ask.nick $skin(start) 0#Kurupt.Radio $skin(mid) Stream-1: http:// $+ %serverip1 $+ : $+ %port1 $+ /listen.pls  DJ: %dj 8)
    notice %ask.nick $skin(start) 0#Kurupt.Radio $skin(mid) Song: %tsong1  Listeners: %tlisteners1 $+ /1337  Peak: %tpeak1 $skin(end)
  }
}