PM Blocker

By ZiX on Dec 10, 2007

This is just a simple pm blocker.
*To Open type /dialog -m pmblocker pmblocker
or right click on any mirc window and click on "Pm Blocker"

============================
=======PM BLOCKER=========
============================
menu * {
  PM Blocker:/dialog -m pmblocker pmblocker
}
dialog pmblocker {
  title "Pm Blocker"
  size -1 -1 60 61
  option dbu
  box "PM Blocker", 1, 0 1 60 30
  button "ON", 2, 5 10 20 13, flat
  button "OFF", 3, 35 10 20 13, flat
  box "Pm's Blocked", 4, 0 32 60 28
  text "", 5, 30 45 20 40
  text "Pm's Blocked", 6, 3 40 20 40
} 
on *:DIALOG:pmblocker:sclick:2:{
  set %pm.block on 
  amsg 15-(12 I Am No Longer Accepting P2p's15)-
}
on *:DIALOG:pmblocker:sclick:3:{
  set %pm.block off
  amsg 15-(12 I Am Now  Accepting P2p's15)-
}
on *:dialog:pmblocker:init:*: {
  did -a pmblocker 5 ( $+ %pms.blocked $+  )
}
on 1:open:?:*: { 
  if (%pm.block == on) { inc %pms.blocked 1 | msg $nick 15-(12 hm Hello $nick I Am Not Accepting Any P2p's From Anyone At This Time Please P2p Me Later15)- }
  elseif (%pm.block != on) halt 
  echo -d 15-(14Pm Blocker15)- -(14Name12:14 $+ $nick $+ 15)- -(14with msg12:14 $+ $1- $+ 15)- -(14 At  15( $+ 12 $+ $time(h:nn:tt ) $+ 15)
  close -m $nick
}

Comments

Sign in to comment.
Eugenio   -  Apr 25, 2008

1/10 -_-\'

 Respond  
guest598594   -  Dec 11, 2007

menu * rather

 Respond  
guest598594   -  Dec 11, 2007

so maybe u shuold do like

menu channel {
  $iif(!$server,$style(2)) PM Blocker: $iif($server,dialog $iif($dialog(pmblocker),-v,-m) pmblocker pmblocker)
}
 Respond  
Rebellious   -  Dec 10, 2007

Yes, but the script can be enabled and disabled while disconnected. If you enable it or disable it while disconnected, the script will amsg. Thus giving an error.

 Respond  
SLS10   -  Dec 10, 2007

One issue, Mountaindew. If someone isn\'t connected, do they expect to get a PM? Also, why would anyone PM themselves?

Little nitpicky thing I am. Sorreh.

 Respond  
guest598594   -  Dec 10, 2007

i found a lot of things wrong with this script :/

if u try to open the dialog with the menu when its open, it gives an error (solve with $iif and dialog +v/+m)
if you arent connected or arent on a channel, it gives an /amsg error
if you pm urself, it goes nuts until you turn it off (when you pm urself that u dont accept pms, it just keeps going on and on with the on open)
the pms blocked () duznt update unless u refresh the dialog

suggestion: i would disable the on/off button when you click it so that you know whether its on/off

but other than that, i guess it serves its main purpose under the correct circumstances

 Respond  
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.