/* This is the "penalty" addon for the CHECK-404 plugin for SREhttp/2 */

parse arg list,servername,verb,tempfile,,
          prog_file,reqnum,verbose,client_ip,privset,,
          uri,host_nickname,id_info,aiter,attribs

parse var list npenalty '&' amessage
amessage=sre_packur(translate(amessage,' ','+'))

if datatype(npenalty)<>'NUM' then npenalty=2
nowtime=sreh2_current_second()
foo=sre_cache('CHK_404','PREPEND',client_ip,nowtime||'='||strip(npenalty)||' ',,0)

if amessage='' then amessage='Resource is not available.'
return 'string 'amessage


