All pastes #465061 Raw Edit

Someone

public text v1 · immutable
#465061 ·published 2007-04-29 21:56 UTC
rendered paste body
on $*:TEXT:/^[`!@.](leave feedback|leave comment|add comment|add feedback)/Si:#thepc.feedback:{
  if ($nick !isreg #thepc) && ($nick ison #thepc) {
    if (!$3-) {
      if ($read(feedback.txt,w,* $+ $($+($nick,$chr(32),$address($nick,2))) $+ *)) && (%spammer [ $+ [ $nick ] ] == yes) {
        notice $nick You have already left a comment with in the last 10 minutes
      }
      else {
        notice $nick Please leave some comments, if you leave abuse expect a 4blacklist from #thepc channels
      }
    }
    if ($3-) {
      if ($read(feedback.txt,w,* $+ $($+($nick,$chr(32),$address($nick,2))) $+ *)) && (%spammer [ $+ [ $nick ] ] == yes) {
        notice $nick You have already left a comment with in the last 10 minutes
      }
      else {
        write feedback.txt $nick (Host: $address($nick,2) at Time: $time (GMT) Date: $date $+ ) COMMENTED: $3-
        notice $nick Feedback added, You may add another comment in 10 minutes
        set -u600 %spammer [ $+ [ $nick ] ] yes
      }
    }
  }
}
on $*:TEXT:/^[`!@.]p(lay) feedback/Si:#thepc.feedback:{
  if ($nick isop #thepc) || ($nick ishop #thepc) && ($nick ison #thepc) {
    if (%protect == yes) {
      notice $nick This command has been used already with in the minute, pls wait till min is over
    }
    else {
      set -u60 %protect yes
      set %playpls $iif(($left($1,1) == @),play #thepc.feedback,play $nick)
      %playpls feedback.txt

    }
  }
}
on $*:TEXT:/^[`!@.]clear feedback/Si:#thepc.feedback:{ 
  if ($nick isop #thepc) || ($nick ishop #thepc) {
    write -c feedback.txt 
    msg $chan Feedback Database cleared
  }
}

on $*:TEXT:/^[`!@.]feedback/Si:#thepc.feedback:{ 
  set %playpls $iif(($left($1,1) == @),msg #thepc.feedback,notice $nick)
  var %x = 1
  while (%x <= $lines(feedback.txt)) {
    var %o = $read(feedback.txt,w,* $+ $($+($2,$chr(32),$address($2,2))) $+ *, %x)) {
      %playpls $iif(%o,%o,$null)
    inc %x }
    else { inc %x } 
  }
}