Public paste
Undefined
By: Guest | Date: Oct 28 2010 11:02 | Format: None | Expires: never | Size: 1.52 KB | Hits: 763

  1. menu nicklist {
  2.   Pm Control
  3.   .Allow PMs From $1:PmControl add $$1
  4.   .Disallow PMs From $1:PmControl Del $$1
  5. }
  6. alias PmControl {
  7.   if ( $1 == add ) {
  8.     if ( $address($2,0) != $null ) {
  9.       hadd -m PmControl $right($address($2,0),-2)
  10.       echo 3 -a Added $right($address($2,0),-2) to PmAccept List
  11.     }
  12.     else {
  13.       .enable #userhostadd
  14.       userhost $2
  15.     }
  16.   }
  17.   if ( $1 == del ) {
  18.     if ( $address($2,0) != $null ) {
  19.       hdel PmControl $right($address($2,0),-2)
  20.       echo 3 -a Removed $right($address($2,0),-2) From the PmAccept List
  21.     }
  22.     else {
  23.       .enable #userhostdel
  24.       userhost $2
  25.     }
  26.   }
  27. }
  28. #userhostadd off
  29. raw 302:*: {
  30.   hadd -m PmControl $right($gettok($1-,2,61),-1)
  31.   echo 3 -a Added $right($address($2,0),-2) to PmAccept List
  32.   .disable #userhostadd
  33.   halt
  34. }
  35. #userhostadd end
  36. #userhostdel off
  37. raw 302:*: {
  38.   hdel PmControl $right($gettok($1-,2,61),-1)
  39.   echo 3 -a Removed $right($address($2,0),-2) From the PmAccept List
  40.   .disable #userhostdel
  41.   halt
  42. }
  43. #userhostdel end
  44. on ^*:open:?:*: {
  45.   if ( !$hfind(PmControl,$address) ) {
  46.     hinc -mu60 PmControl $+(Flood.,$address)
  47.     if ( $hget(PmControl,$+(Flood.,$address)) == 1 ) {
  48.       .msg $nick Sorry this PM Has been automatically rejected as you are not on my accept list. Please Contact me through a Known Channel.
  49.     }
  50.     halt
  51.   }
  52. }
  53. On *:start: {
  54.   hmake PmControl 20
  55.   $iif( $isfile(PmControl.hsh) , hload PmControl PmControl.hsh )
  56. }
  57. on *:Exit: {
  58.   hsave -o PmControl PmControl.hsh
  59.   hfree PmControl
  60. }