• Home
  • Servers
  • Chat
  • Channels
  • Commands
  • Forum
  • FAQ
  • Software
  • Quotes
Topic Options
Rate This Topic
#582 - 01/07/08 11:49 AM PM Accept/Deny Script ****
Phil Offline
Over 200 posts

Registered: 10/23/06
Posts: 205
Loc: Warwick, UK
By popular request, here it is:

Code:
; PM Script by Phil
; This code is released under the BSD license

menu channel,menubar,status {
  PM
  .PMs Off:/set %pmstat OFF | /echo -a 4 PM SYSTEM OFF
  .PMs On:/unset %pmstat | /echo -a 12 PM SYSTEM ON
  .PM Confirm Without Reason:/set %pmstat NR | /echo -a 7 PM SYSTEM SET TO CONFIRM WITHOUT REASON
  .PM Confirm With Reason:/set %pmstat R | /echo -a 13 PM SYSTEM SET TO CONFIRM WITH REASON 
}

on ^*:OPEN:?: {
  if (%genericAway != $null) {
    /query $nick 4**1 $me is currently away. Please leave a message 4**
  }
  else {
    if (%pmstat == OFF) {
      /query $nick 4**1 $me has PM system currently turned off 4**
      /close -m $nick
      /echo -a 9 $nick tried to PM you on $network
      /halt
    }
    else {
      .timer 1 1 .pmal $nick $network
    }
  }
}

alias pmal {
  if (%pmstat == NR) {
    /query $1 ***12Please Hold While I Accept/Reject Your PM***
    /set %pmvar $input($1 wants to PM you on $2. Accept this PM?,y,PM)
    if (%pmvar == $false) {
      /query $1 ***4Your PM Request Has Been Rejected. You Have Been Ignored For 10 Seconds.***
      /ignore $1
      .timer 1 10 /ignore -r $1
      /close -m $1
      /halt
    }
    else {
      /query $1 ***9Query Request Accepted***
    }
  }
  elseif (%pmstat == R) {
    /query $nick ***12Please Hold While I Accept/Reject Your PM***
    /set %pmvar $input($1 wants to PM you on $2. Accept this PM?,y,PM)
    if (%pmvar == $false) {
      /set %reason $?="What is your reason?"
      /query $1 ***4Your PM Request Has Been Rejected. You Have Been Ignored For 10 Seconds.7Reason: %reason***
      /ignore $1
      .timer 1 10 /ignore -r $1
      /close -m $1
      /halt
    }
    else {
      /query $1 ***9Query Request Accepted***
    }
  }
  unset %pmvar
}

on 1:INVITE:#:{
  .timer 1 0 .joinal $nick $network $chan
}

alias joinal {
  set %joinvar $input($1 has invited you to $3 on $2 $+ . Join this chan?,y,Invite)
  if (%joinvar == $false) {
    /notice $1 Your request for me to join $3 on $2 has been rejected.
  }
  else {
    /join $3
  }
}


To Use:

  • Open mIRC
  • Hit alt + r
  • Paste it at the bottom of the text area
  • Click OK
  • Right click any channel window (the place where you see what other people type)
  • Click the PM menu
  • Select the setting you desire ("PM Confirm Without Reason" is the most commonly used)
  • Get someone to PM you to test


Phil

Top
Sponsored Links
Sponsored Links
Member
*****

Registered: 27/08/04
Posts: 10136
Loc: Mountain View, CA
Top
#584 - 01/07/08 07:08 PM Re: PM Accept/Deny Script [Re: Phil]
se7enFold Offline
n00b

Registered: 01/06/08
Posts: 11
Loc: Canada
i noticed this code at the end.

on 1:INVITE:#:{
.timer 1 0 .joinal $nick $network $chan
}

alias joinal {
set %joinvar $input($1 has invited you to $3 on $2 $+ . Join this chan?,y,Invite)
if (%joinvar == $false) {
/notice $1 Your request for me to join $3 on $2 has been rejected.
}
else {
/join $3


IS it part of the PM thing?

Nice script Thank you


Top
#610 - 01/08/08 07:41 PM Re: PM Accept/Deny Script [Re: se7enFold]
GTPeach Offline
n00b

Registered: 01/03/08
Posts: 12
Loc: Somewhere, USA
You do need that in the script. Basically, he's turned off an automatic setting and scripted in his own fix to it. wink

Top
#611 - 01/08/08 08:00 PM Re: PM Accept/Deny Script [Re: GTPeach]
Phil Offline
Over 200 posts

Registered: 10/23/06
Posts: 205
Loc: Warwick, UK
By GTPeach's request, a slightly more discrete version of the script which doesn't notify the user that you're accepting/rejecting:

Code:
; PM Script by Phil
; This code is released under the BSD license

menu channel,menubar,status {
  PM
  .PMs Off:/set %pmstat OFF | /echo -a 4 PM SYSTEM OFF
  .PMs On:/unset %pmstat | /echo -a 12 PM SYSTEM ON
  .PM Confirm Without Reason:/set %pmstat NR | /echo -a 7 PM SYSTEM SET TO CONFIRM WITHOUT REASON
}

on ^*:OPEN:?: {
  if (%pmstat == OFF) {
    /query $nick 4**1 $me has PM system currently turned off 4**
    /close -m $nick
    /echo -a 9 $nick tried to PM you on $network
    /halt
  }
  else {
    .timer 1 1 .pmal $nick $network
  }
}

alias pmal {
  window -a $1

  if (%pmstat == NR) {
    /describe $1 doesn't accept PMs
    /set %pmvar $input($1 wants to PM you on $2. Accept this PM?,y,PM)
    if (%pmvar == $false) {
      /ignore $1
      .timer 1 10 /ignore -r $1
      /close -m $1
      /halt
    }
  }

  unset %pmvar
}

on 1:INVITE:#:{
  .timer 1 0 .joinal $nick $network $chan
}

alias joinal {
  set %joinvar $input($1 has invited you to $3 on $2 $+ . Join this chan?,y,Invite)
  if (%joinvar == $false) {
    /notice $1 Your request for me to join $3 on $2 has been rejected.
  }
  else {
    /join $3
  }
}


Phil

Top


Moderator:  Jeff, mandy, usrbingeek