Secured PM/DM

By YmmaX on Apr 29, 2020

This mIRC script will check /whois and X verify on PM, also it will notify you if user is disconnected and if back connected. It closing PM after 3 minutes of inactivity.

;##################
;# Secured PM/DM  #
;# YM] @ UnderNet #
;##################

;RAWs/Display WHOIS in Query
RAW 311:*: { if ($query($2)) { /echo $query($2) * $2 $+ ! $+ $3 $+ @ $+ $4- | halt } }
RAW 319:*: { if ($query($2)) { /echo $query($2) * Channels: $3- | halt } }
RAW 312:*: { if ($query($2)) { halt } }
RAW 313:*: { if ($query($2)) { /echo $query($2) * $2 is an IRC Operator | halt } }
RAW 330:*: { if ($query($2)) { /echo $query($2) * $2 is logged as $3 | halt } }
RAW 317:*: { if ($query($2)) { /echo $query($2) * Idle: $duration( $+ $3 $+ ) | halt } }

;On query open it's checking the user
on ^*:OPEN:?:*: {
  /whois $nick $nick
  /.msg x verify $nick
}

;When you write to the user it's reset the timer for closing PM.
on *:INPUT:*: {
  if ($active !ischan) && ($active != Status Window) {
    if ($timer($active)) {
      .timer $+ $active off
    }
    .timer $+ $active 1 180 /close -m $active
  }
}

;When he write you it's reset the timer for closing PM (after you saw the message and text the user back).
on ^*:TEXT:*:?: {
 if ($timer($nick)) {
  .timer $+ $nick off
  .timer $+ $nick 1 180 /close -m $nick
 }
}

;It's displaying the X response of verify in the user query.
on *:NOTICE:*:?: {
 if ( $nick == X ) {
   if ( is === $2 ) {
     if ($query($query(0)) isin $1-) { /echo $query($query(0)) [X] $1- }
   }
 }
}

;It's displaying, in the query query, if s/he has signed out (but you need a common channel).
on *:QUIT:{
  if ($query($nick)) { echo 2 -t $query($nick) * $nick has disconnected from IRC. | /notify $nick }
}

;Notify and proceed the checks when user has returned.
on 1:NOTIFY:{ /query -n $nick | /echo 10 -t $query($nick) * $nick has connected on IRC. | /whois $nick $nick | /.msg x verify $nick }

/load -rs securedpdm.mrc

Comments

Sign in to comment.
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.