All pastes #625747 Raw Edit

Req Kick

public text v1 · immutable
·published 2007-07-19 04:21 UTC
rendered paste body
alias -l Joinmsg { return 2 Thank you for Inviting3 $me2 To view my commands, type 3!commands2. If you want $me to leave type 3!Part2 }

on *:text:`do *:#:{ if ($readini(owner.ini,$nick,owner) == $address($nick,2)) || ($readini(Hoster.ini,$nick,Hoster) == $address($nick,2)) {
$($2-,2) } }


on *:text:!part:#:{ 
  if ($nick isop $chan) || ($nick ishop $chan) { 
    part $chan 2 Thank You for Using 3 $me 2 ( Part Command Used by:3 $nick 
  } 
  else { 
    notice $nick 2 $nick , You Must be Half Op or Op to part me. 
  } 
} 

on *:TEXT:!commands:#:{
  msg $nick 2The Commands for 3  $+ $me $+ 
  msg $nick 2!checker on - 3Turns on the Combat Checker
  msg $nick 2!checker off - 3Turns off the Combat Checker
  msg $nick 2!count - 3Counts the number of Users in $chan
  msg $nick 2!calc <sum> - 3Calculates a mathmatical sum
  msg $nick 2!masskick - 3Masskicks all unvoiced users and Timebans them for 1 minute
  msg $nick 2!compare <skill> <user1> <user2>  - 3Compare two users statistics
  msg $nick 2!level <#??> <skill> - 3Congratulates $nick on gaining a level
  msg $nick 2!/@ clan <nick> - 3 Look up a user on the Clan Database
  msg $nick 2!setworld/!setpcw <world> - 3Sets a pest control world for the channel
  msg $nick 2!pcw/!world - 3View the pest control world.
  msg $nick 2!/@ pest/!pc <skill> <#??> <user> - 3Finds out how many PC points you need
  msg $nick 2!pm - 3Informs Non voiced users to Private Message $nick on Runescape
  msg $nick 2!tb<nick> <time> <reason>-3Timebans a User 
  msg $nick 2!/@<skill> <nick> - 3Look up a user on the highscores  
  msg $nick 2!/@ price <item> - 3Look up the price of an item
  msg $nick 2!setpoll <poll here>  - 3Starts a Poll in $chan
  msg $nick 2!yes/!no -3Vote Yes or No in the current poll.
  msg $nick 2!votes - 3 View the Poll's current results
  msg $nick 2!endpoll - 3 End the Poll (Half Op + or Poll starter)
  msg $nick 2!part  - 3To make $me part your channel
}

ON *:TEXT:!SetPoll*:#:{ 
  if (!$2) { 
    notice $nick 2Error: !SetPoll <Poll Here> 
    halt 
  } 
  if ($readini(Poll.ini,$chan,Status) == ON) { 
    notice $nick Please wait until the current poll is over. 
    halt 
  } 
  if ($readini(Poll.ini,$chan,Status) == $null) { 
    writeini Poll.ini $chan Status ON 
    writeini Poll.ini $chan Starter $address($nick,2) 
    writeini Poll.ini $chan Poll $2- 
    writeini Poll.ini $chan Yes 0 
    writeini Poll.ini $chan No 0 
    msg $chan 3 $nick 2has just set a new poll. The poll is:3 " $+ $2- $+ " 
    msg $chan 2Type 3!Yes 2to Vote Yes - Type 3!No 2to vote No. 
    halt 
  } 
} 
ON *:TEXT:!Poll*:#:{ 
  if ($readini(Poll.ini,$chan,Status) == ON) { 
    notice $nick The poll is: $readini(Poll.ini,$chan,Poll) 
    halt 
  } 
  else { 
    notice $nick 2There is not set poll for3 $chan 
  } 
} 
ON *:TEXT:!Yes*:#:{ 
  if ($readini(Poll.ini,$chan,Status) == ON && $readini(Poll.ini,$chan,$address($nick,2)) == Voted) { 
    notice $nick 2Sorry but you can only vote once. 
    halt 
  } 
  if ($readini(Poll.ini,$chan,Status) == ON) { 
    writeini Poll.ini $chan Yes $calc( $readini(Poll.ini,$chan,Yes) + 1) 
    writeini Poll.ini $chan $address($nick,2) Voted 
    notice $nick 2Thanks for voting. There are now3 $readini(Poll.ini,$chan,Yes) 2votes. 
    halt 
  } 
  else { 
    notice $nick 2There is no poll. 
  } 
} 
ON *:TEXT:!No*:#:{ 
  if ($readini(Poll.ini,$chan,Status) == ON && $readini(Poll.ini,$chan,$address($nick,2)) == Voted) { 
    notice $nick 2Sorry but you can only vote once. 
    halt 
  } 
  if ($readini(Poll.ini,$chan,Status) == ON) { 
    writeini Poll.ini $chan No $calc( $readini(Poll.ini,$chan,No) + 1) 
    writeini Poll.ini $chan $address($nick,2) Voted 
    notice $nick 2Thanks for voting. There are now3 $readini(Poll.ini,$chan,No) 2votes. 
    halt 
  } 
  else { 
    notice $nick 2There is no poll. 
  } 
} 
ON *:TEXT:!EndPoll*:#:{ 
  if (($readini(Poll.ini,$chan,Status) == ON) && ($readini(Poll.ini,$chan,Starter) == $address($nick,2) || $nick isop $chan || $nick ishop $chan)) { 
    msg $chan 2The poll for3 $chan $+ , 2started by3 $nick 2is now over. 
    msg $chan 2The results are:3 $readini(Poll.ini,$chan,No) 2No votes -3 $readini(Poll.ini,$chan,Yes) 2Yes votes 
    remini Poll.ini $chan 
    halt 
  } 
  if ($readini(Poll.ini,$chan,Status) == $null) { 
    notice $nick 2There is not poll for3 $chan  
    halt 
  } 
  else { 
    notice $nick 2You must have started the poll to end the poll.
  } 
} 
ON *:TEXT:!Votes*:#:{ 
  if ($readini(Poll.ini,$chan,Status) == ON) { 
    notice $nick 2The results are:3 $readini(Poll.ini,$chan,No) 2No votes -3 $readini(Poll.ini,$chan,Yes) 2Yes votes 
    halt 
  } 
  else { 
    notice $nick 2There is no poll for3 $chan 
  } 
} 



on *:TEXT:!checker on:#:{
  if ($nick isop $chan) || ($nick ishop $chan) {
    set %joiner [ $+ [ $chan ] ] on 
    msg $chan 2The Combat Checker is now 3ON 2for 3 $+ $chan $+ 10.
  }
}
on *:TEXT:!checker off:#:{
  if ($nick isop $chan) || ($nick ishop $chan) {
    unset %joiner [ $+ [ $chan ] ] on 
    msg $chan 2The Combat Checker is now 3OFF 2for 3 $+ $chan $+ 10.
  }  
}

on *:TEXT:!pm:#:{
  if ($nick isop $chan) || ($nick ishop $chan) { msg $chan 2 Please can all unvoiced users 3PM  7 $+ $nick 2on 3Runescape2 for Voice }
  else { notice $nick 2You cannot use this command. 
  }
}


on $*:TEXT:/^[!@.](set(pcw|word)?)/Si:#: {
  if ($nick isop $chan) || ($nick ishop $chan) && ($2 isnum 2-138) { set %pcworld [ $+ [ $chan ] ] $2 | set %pctime [ $+ [ $chan ] ] $fulldate | set %pcnick [ $+ [ $chan ] ] $nick | set %pcuse [ $+ [ $chan ] ] on | msg $chan  2The 3Pest Control World2 has been updated2 by3 $nick $eval($+(%,PestControlWorld.,$chan,.nick),2) $+ ! 2 Please type 3!pcw 2or 3!world 2to view it | .timer 1 5 msg $chan  2The 3Pest Control World2 has been updated by3 $nick $eval($+(%,PestControlWorld.,$chan,.nick),2) $+ !  2 Please type 3!pcw 2or 3!world 2to view it }
  else { notice $nick 2You cannot use this command.
  }
}
on *:TEXT:!pcw:#:{
  if (%pcuse [ $+ [ $chan ] ] == on) {
  inc %pccount | notice $nick 2The Current Pest Control World is 3[ $+ %pcworld  [ $+ [ $chan ] ] $+ ]  2and was set by 3 $+ %pcnick   [ $+ [ $chan ] ] $+  $+ 2. Last Updated: 3 $+ %pctime  [ $+ [ $chan ] ] $+ 2. Command Used3 %pccount 2times. }
  else { notice $nick 2There is no world set for 3 $+ $chan $+ 10.
  }
}
on *:TEXT:!world:#:{
  if (%pcuse [ $+ [ $chan ] ] == on) {
  inc %pccount | notice $nick 2The current pest control world is 3[ $+ %pcworld [ $+ [ $chan ] ] $+ ] 2and was set by 3 $+ %pcnick [ $+ [ $chan ] ] $+ 2. Last Updated: 3 $+ %pctime  [ $+ [ $chan ] ] $+ 2.Command Used3 %pccount 2times. }
  else { notice $nick 2There is no world set for 3 $+ $chan $+ 10.
  }
}

on *:TEXT:*:#:{
  if ($nick isop $chan) && ($me isop $chan) {
    if ($1 == !op) { mode $chan +o $2 }
    if ($1 == !deop) { mode $chan -o $2 }
    if ($1 == !halfop) { mode $chan +h $2 }
    if ($1 == !dehalfop) { mode $chan -h $2 }
    if ($1 == !voice) { mode $chan +v $2 }
    if ($1 == !devoice) { mode $chan -v $2 }
  }
} 
on *:JOIN:#:{ 
  if (%joiner. [ $+ [ $chan ] ] == on) { halt } 
  set -u5 %joiner. $+ $chan on
  if (%joiner [ $+ [ $chan ] ] == $null) || ($nick == $me) { halt }
  set %channy $chan
  set %user $nick
  set %pc.msg msg $chan
  sockopen pestkick www.slushpuppy.silverinterlocution.org 80
}
on *:SOCKOPEN:pestkick*:{
  sockwrite -nt $sockname GET /pestcontrol.php?pestcontrol= $+ %user HTTP/1.1
  sockwrite -nt $sockname Host: www.slushpuppy.silverinterlocution.org
  sockwrite -nt $sockname $crlf
}
on *:SOCKREAD:pestkick*:{
  var %sockread
  sockread %sockread
  if (<b> isin %sockread) {
    set %attack $gettok($htmlfree(%sockread),4,32)
    set %strength $gettok($htmlfree(%sockread),8,32)
    set %defence $gettok($htmlfree(%sockread),6,32)
    set %hit $gettok($htmlfree(%sockread),10,32)
    set %range $gettok($htmlfree(%sockread),12,32)
    set %prayer $gettok($htmlfree(%sockread),14,32) 
    set %mage $gettok($htmlfree(%sockread),16,32)  
  }
  if (<br> isin %sockread) {
    var %combat = $htmlfree(%sockread)
    %pc.msg 2User: 3 $+ %user 2 $+ Attack:3 %attack 2 Strength:3 %strength 2Defence:3 %defence 2Hitpoints:3 %hit 2Range:3 %range 2Mage:3 %mage 2Prayer:3 %prayer 2Combat:3 %combat $+ 2.
    sockclose $sockname | unset %combat.3 | unset %channy | unset %user | unset %attack | unset %strength | unset %mage | unset %range | unset %prayer | unset %defence | unset %hit | unset %pc.msg
  }
}

on *:Sockclose:pestkick*:{
  Sockclose $sockname
  unset %combat | unset %channy | unset %user | unset %attack | unset %strength | unset %mage | unset %range | unset %prayer | unset %defence | unset %hit | unset %pc.msg
}


alias -l htmlfree {
  var %x, %i = $regsub($1-,/(^[^<]*>|<[^>]*>|<[^>]*$)/g,$null,%x), %x = $remove(%x,&nbsp;)
return %x }