p4mac   -  Jan 31, 2018

has anyone got a good file request script that eg !request !filled etc thanks

rebel9  -  Feb 21, 2018

yes.

on *:load: { 
  hmake requests 1000
  if ($isfile(requests.hash)) { hload requests requests.hash }
}
on *:exit: { hsave requests requests.hash }
on *:start: {
  hmake requests 1000 
  if ($isfile(requests.hash)) { hload requests requests.hash } 
}
alias regtot { return $hget(requests,0).item }

On $*:Text:/^[!%.@](rq|request)(\s|$)/Si:#: {  
  if (!$2) { msg $chan [Ex. !12request <file12.name12.here>] }
  elseif (!fld. [ $+ [ $nick ] ]) {
    set -u2 %fld. [ $+ [ $nick ] ] 1
    if ($2 != list) { 
      hadd requests $2 $nick | msg $chan Request  $2- by $+(,$nick,) has been added to the Requests list. 
    }
    elseif ($2 == list) {
      var %cc $iif($regtot <= 10,$regtot,10) 
      msg # Listing Most Recent !Requests... 
      var %c 1 
      while (%c <= %cc) { 
        msg $chan $+(,%c,.) $hget(requests,%c).item 
        inc %c 
      }  
      msg # $+(,$retot,) Total Request(s). 
    } 
    elseif ($+(*,$chr(32),*) !iswm $2-) { 
      msg $chan Error with !request: No Spaces, you must use periods... !request title.name.goes.here
    }
  }
}
On $*:Text:/^[!%.@](fill|filled)(\s|$)/Si:#: {
  if (!$2) { msg $chan [Ex. !12filled <file12.name12.here>] }
  if (!fld. [ $+ [ $nick ] ]) {
    set -u2 %fld. [ $+ [ $nick ] ] 1
    if ($+(*,$chr(32),*) iswm $2) {
      msg $chan Error with !filled: No Spaces, you must use periods... !filled title.name.goes.here 
    }
    if ($hfind(requests,$2,1)) { 
      hdel requests $2
      msg $chan The !Request $+(,$2-,) has been Filled!
    }
  }
} ;;rebel 2018
Sign in to comment

Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.