I made additions to the code originally posted. I added a hash table to store ip address and a numeral for a person whom pm'ed me, if it was the first pm they'll get a warning, if the second they get kicked/ban.

The script appears to work perfectly, though I'm stuck on trying to expand on it further.

I wish to:
increment the number of times a user pms me
kick/ban dependent on number of times settable by me
kick/ban for a span of time. 1min to Infinity
read from text file for nics that are not Ops or Voices but are approved to pm me

Any direction you could provide would be invaluable. I thank you for your indulgence.

Raja Bahm


*************** updated coding ***************

Code:
 
on *:start: {
  hmake qcount 10
}
alias queryfilter {
  $iif($group(#queryfilter) == off,.enable,.disable) #queryfilter
  $iif($group(#queryfilter) == off,notice stopping query filter, notice starting query filter)
}
#queryfilter off
on ^*:open:?:*: {
  if ($nick isop #ftres) || ($nick isvoice #ftres) { msg $nick sup7 $nick }

elseif ($me isop #ftres) && ($hget(qcount,$address($nick,2))) {
  .kick #ftres $nick Couldnt read... could ya.
   mode #ftres  +b $address($nick,2)
    }
else {
   hadd -m qcount $address($nick,2) 1
   msg $nick Don't msg ops/voices without permission. Repeat violators will be 4kicked/banned.
   timer -m 1 4000 msg $nick Did you get that?
}
}
#queryfilter end

on *:EXIT: {
  hsave -o qcount qcount.hsh
  hfree qcount
}

 


Whats life without a little Karma?
maddkarma[dot]com