PM Redirector/Blocker

By PurplesurgeMirc on Jun 17, 2009

/pm on
/pm off
Above commands block or allow pms

When they're allowed, they are redirected to a special network-related window.
/adduser <nick/address>
Anyone level 2 or above can pm you even if you have pms disallowed.

Blue messages for anyone >= 2, meaning they can pm you whenever
Yellow messages for level 1 users while you're accepting pms
Red messages for blocked level 1 user messages

Author: Rolo @ #mIRC on PurpleSurge

#pmblock on
on *:connect: window -e +b @ $+ $network $+ .Query /.msg arial 12

on ^*:open:?:*:{
  haltdef
  if (%nopm == on) {
    if ($ulevel < 2) {
      if (!% [ $+ [ $nick ] $+ [ .pm. ] $+ [ $network ] ]) {
        .msg $nick 2:: I am not accepting queries right now. 2::
        set % $+ $nick $+ .pm. $+ $network 1
        aline -hp 4 @ $+ $network $+ .Query <-- $ulevel 2:: $+(<,$nick,>) Tried to query you. 2::
        .timerquery 1 300 unset % $+ $nick $+ .pm. $+ $network
      }
      elseif (% [ $+ [ $nick ] $+ [ .pm. ] $+ [ $network ] ] == 1) {
        .msg $nick 2:: For repeated queries, you have been placed on temporary ignore. 2::
        .ignore -u600 $nick
        aline -hp 4 @ $+ $network $+ .Query <-- $ulevel 2:: $+(<,$nick,>) Tried to query you again and was ignored. 2::
        .timerquery off
      }
    }
    else aline -hp 12 @ $+ $network $+ .Query <-- $ulevel 2:: $+(<,$nick,>) $1- 2::
  }
  if (!%nopm) aline -hp $iif($ulevel > 1,12,8) @ $+ $network $+ .Query <-- $ulevel 2:: $+(<,$nick,>) $1- 2::
}

on *:input:@*.Query: aline -p 12 @ $+ $network $+ .Query --> ~ 2:: $+(<,$me,>) $3- 2:: $iif($1 == /.msg,--> $2)

alias pm { 
  $iif($1 == on,unset,set) %nopm on
  scon -a echo -s 2::14 $iif($1 == on,Now accepting queries.,No longer accepting queries.) 2:: 
}
alias adduser { auser $2 $1 }
#pmblock end

Comments

Sign in to comment.
chachin   -  Aug 04, 2012

Dont know what happend but this is what happends

  • /aline: invalid window (line 11, script20.mrc)

line 11: aline -hp 4 @ $+ $network $+ .Query <-- $ulevel 2:: $+(<,$nick,>) Tried to query you. 2::

 Respond  
GlobalAnomaly   -  Aug 21, 2009

Nice script. I'm using it >_>

 Respond  
buddy   -  Jun 18, 2009

Wow i like this. different with other pm blocker in hawkee.

 Respond  
PurplesurgeMirc   -  Jun 17, 2009

Thanks for that, wrote it a few months ago and didn't double check.
Fixed that and a few other things.

 Respond  
Lord-Harlot   -  Jun 17, 2009

Looks like an epic script.
if (%nopm == $null) {
That is bugging me though
if (!%nopm)

:(

 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.