on 1:load:{ aboutPMB }

#pmblock off
-
on *:text:*:?:{ 
  if ($nick != $me) { msg $nick 7,2Sorry $nick $+ , I am not accepting private messages right now. | msg $nick 7,2You have been ignored for %igt seconds. | .ignore -pcntiku%igt $nick | .ignore -pcntiku%igt $address | echo -a 4Now ignoring $nick $+ @ $+ $address $+ . | .timerIgt 1 %igt echo -a 4No longer ignoring $nick $+ @ $+ $address $+ . }
}
-
#pmblock off

alias aboutPMB {
  window -abdo +e @aboutPMB 0 0 705 210 | echo @aboutPMB 14,15PMBlock.mrc - Private Message Blocker | echo @aboutPMB 15,14Script written by Erik Bosko | echo @aboutPMB 14,15Copyright 2001 Shadowtech | echo @aboutPMB 15,14Send comments or questions to 7RedElvises2001@msn.com | echo @aboutPMB 1,1  | echo @aboutPMB 14,15When the script is "on", any private message sent to you | echo @aboutPMB 15,14Will have a message sent back saying "I am not accepting messages right now" | echo @aboutPMB 14,15The sender will then be placed on ignore for the time you've set. | echo @aboutPMB 15,14When the script is "off", all private messages will be allowed. | echo @aboutPMB 14,15Turning the script "On" will also allow you to set the Ignore time. | echo @aboutPMB 15,14All options can be found in the menubar, channel window, and private message window.
}

menu menubar,channel,query {
-
PM Blocker
.Block PM:{
  if ($group(#pmblock) == on) { echo -a 4Already blocking private messages. | halt }
  elseif ($group(#pmblock) == off) { set %igt $?="Enter time [in seconds]:" | echo -a 4Ignore time set for %igt seconds. | .enable #pmblock | echo -a 4Now 7,0blocking 4private messages. | halt }
}
.Accept PM:{
  if ($group(#pmblock) == off) { echo -a 4Already accepting private messages. | halt } 
  elseif ($group(#pmblock) == on) { .timerIgt off | .unset %igt | .disable #pmblock | echo -a 4Now 7,0accepting 4private messages. | halt }
}
.-
.About:{ aboutPMB }
.Unload:echo -a 4Script unloaded | .unload -rs pmblock.mrc
}

