Sponsored Links




Topic Options
Rate This Topic
#582 - 01/07/08 11:49 AM PM Accept/Deny Script
Phil Administrator Offline
WyldRyde Staff

Registered: 10/23/06
Posts: 91
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
_________________________
WyldRyde Global Admin.

Owner of Cylon and Mars
Co-Owner of Enterprise

Lusci.Com

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 Administrator Offline
WyldRyde Staff

Registered: 10/23/06
Posts: 91
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
_________________________
WyldRyde Global Admin.

Owner of Cylon and Mars
Co-Owner of Enterprise

Lusci.Com

Top


Recent Posts
Rules for Voiced (+v) users in #Chris
by Axlin
11/20/08 05:36 PM
WyldRyde Channel Management Script **BETA**
by usrbingeek
11/19/08 12:35 AM
Saying Hello
by cirian75
11/18/08 02:13 PM
Multiple Network question
by usrbingeek
11/16/08 10:00 PM
Recruiting new ops and half ops in #iPhone
by techman224
11/14/08 07:09 PM
Common Commands Script
by burace17
11/14/08 02:55 PM
Rules for Voiced Users being Enforced More
by abcd
11/14/08 08:33 AM
New bot policy
by Freekie
11/11/08 10:11 PM
my favorite channels on WR
by sbushfan11
11/10/08 05:42 AM
Volunteer Half-Op Positions Available In My New Ch
by mikem
11/08/08 03:16 PM
Script Bots. Need One?
by Samuel
11/07/08 10:10 PM
Services Help Version 2.4
by Jerry
11/06/08 09:41 PM
Recent Pics
mIRC on Linux???
Computer Spam o_O
My Windows Desktop
Who's Online
1 registered (1 invisible), 4 Guests and 5 Spiders online.
Key: Admin, Global Mod, Mod
Top Posters
usrbingeek 468
Kat 266
iPhone 108
Phil 91
Freekie 85
techman224 75
CCMike 73
Justin 70
tengrrl 55
wirelesspacket 52
Terms Of Use
Use of this community signifies your agreement to the Terms Of Service and Conditions of Use.