Public feed #603037

Miscellany

public text v1 · immutable
Raw Edit
·published 2007-07-04 13:52 UTC
rendered paste body
ON $*:TEXT:/[!@.](Pest|PCW) off/Si:#:{
  if ($readini(PCW.ini,$chan,Status) == OFF) {
    notice $nick You cant turn something off that is not on.
    halt
  }
  if ($nick isop $chan || $nick ishop $chan || $address($nick,2) == $address($me,2)) {
    remini PCW.ini $chan
    writeini PCW.ini $chan Status OFF
    msg $chan 4The PestControl services have been halted by $nick
    halt
  }
  else {
    notice $nick You must be Halfop Plus to use this command.
  }
}
ON $*:TEXT:/[!@.](Pest|PCW) On/Si:#:{
  if (($nick isop $chan || $nick ishop $chan || $nick isvoice $chan || $address($nick,2) == $address($me,2)) && ($readini(PCW.ini,$chan,Status) == OFF)) {
    remini PCW.ini $chan
    msg $chan 9The PestControl services have been continued by $nick
    halt
  }
  if ($readini(PCW.ini,$chan,Status) != OFF) {
    notice $nick You cant turn ON whats not off.
    halt
  }
}
else {
  notice $nick You must be Halfop Plus to use this command.
}
ON $*:TEXT:/[!@.]Set(pcw|world)/Si:#:{
  if ($readini(PCW.ini,$chan,Status) == OFF) { halt }
  if (%autostatus. [ $+ [ $chan ] ] == on) { 
    /timers off
    notice $nick 12The auto call is turned off becauce you did change the world. If you want to turn it again on type: !autocall on <time in seconds>
    if ($nick isop $chan || $nick ishop $chan && ($2 isnum 2-150)) {
      if ($2 == $readini(PCW.ini,$chan,world)) { notice $nick 12haha nice try | halt }
      inc %changed [ $+ [ $nick ] ] 1
      writeini PCW.ini $chan World $2
      writeini PCW.ini $chan Nick $nick
      writeini PCW.ini $chan Time $CTime
      msg $chan 12 The [4P12]est [4C12]ontrol [4W12]orld has been changed by 4 $nick $+ . 12 Press: 4!world 12or 4!pcw 12to vieuw the world!
      if ($2 > 150) {
        notice $nick The world must be Between 2 and 50
        halt
      }
      else {
        notice $nick A PestControl world must be a number.
      }
    }
  }
}
ON $*:TEXT:/[!@.]StopPCW/Si:#:{
  if ($readini(PCW.ini,$chan,Status) == OFF) { halt }
  if ($nick isop $chan || $nick ishop $chan || $nick isvoice $chan || $address($nick,2) == $address($me,2)) {
    remini PCW.ini $chan
    msg $chan 12 All PestControl files for $chan have been deleted.
    halt
  }
}
if ($readini(PCW.ini,$chan,World) == $null) {
  notice $nick
}
ON $*:TEXT:/^[!@.](Suggest|SugWorld)/Si:#:{
  writeini PCW.ini $chan Worldz $2
  writeini PCW.ini $chan Nickz $nick
  writeini PCW.ini $chan Time $CTime
  msg $chan 12[The suggested world is3 $readini(PCW.ini,$chan,worldz) $+ 12] [Suggested by 3 $readini(PCW.ini,$chan,Nickz) $+ 12]
  halt
}
ON $*:TEXT:/^[!@.](Pcw|World)/Si:#:{
  if ($readini(PCW.ini,$chan,Status) == OFF) { halt }
  notice $nick 12[The [4P12]est [4C12]ontrol [4W12]orld  is4 $readini(PCW.ini,$chan,world) $+ 12] [Set by4 $readini(PCW.ini,$chan,nick) $+ 12]
  halt
}

ON $*:TEXT:/^[!@.](Sw|Sworld|Suggested)/Si:#: {
  if ($nick ishop $chan || $nick isop $chan) {
    notice $nick 12[Last suggested world is3 $readini(PCW.ini,$chan,world) $+ 12] [Suggested by3 $readini(PCW.ini,$chan,Nickz) $+ 12]
    halt
  }
}
on *:text:!sets*:#:{
  if ($readini(PCW.ini,$chan,Status) == OFF) { halt }
  if (!$2) {
    if ($nick isreg $chan) { Halt }
    if (%changed [ $+ [ $nick ] ] == $null) {
      msg $chan You haven't set any worlds yet! | Halt
    }
    if ($nick isreg $chan) { Halt }
    elseif (%changed [ $+ [ $nick ] ] != $null) {
      msg $chan $+ $nick has set %changed [ $+ [ $nick ] ] worlds | Halt
    }
  }
  else {
    if ($nick isreg $chan) { Halt }
    if (%changed [ $+ [ $2 ] ] == $null) {
      msg $chan $+ $2 hasnt set any worlds | Halt
    }
    if ($nick isreg $chan) { Halt }
    elseif (%changed [ $+ [ $2 ] ] != $null) {
      msg $chan $+ $2 has set %changed [ $+ [ $2 ] ] worlds
    }
  }
}
on $*:TEXT:/!autocall*/Si:#:{
  if ($readini(PCW.ini,$chan,Status) == OFF) { halt }
  if ($nick isop $chan || $nick ishop $chan) {
    if (!$2) {
      if (%autostatus. [ $+ [ $chan ] ] == $null) {
        set %autostatus. [ $+ [ $chan ] ] on
        notice $nick 12Pest Control auto announce is on.
      }
      else {
        notice $nick 12Pest Control auto announce is4 %autostatus. [ $+ [ $chan ] ] $+ .
      }
    }
    if ($2 == off) {
      set %autostatus. [ $+ [ $chan ] ] off
      notice $nick $c1(Pest Control auto announce is now off).
      /timers off
      if ($3 == $null) { notice $nick you have shut off autocall.
      }
    }
  }
  if ($2 == on) {
    set %autostatus. [ $+ [ $chan ] ] on
  /timer 0 $3 msg $chan 12[The [4P12]est [4C12]ontrol [4W12]orld  is4 $readini(PCW.ini,$chan,world) $+ 12] [Set by4 $readini(PCW.ini,$chan,nick) $+ 12]  }
  elseif ($3 == $null) { notice $nick Please specify the number of seconds per repeat. }
}