Snippets Project Page
Author: entropy
Added: 5y
Updated: 3y
mIRC: 7.52+
Hits: 1,325
Downloads: 48
Review: entropy
Size: 1.26KB
1 0
Login to vote.
Private Message Accept/Decline
v1.0.8
This snippet pops up a dialog when you get a new private message. You can choose either to accept or decline.
Download
JSON
▲ Review
▲ Log
▼ Source
; Private Message Accept/Decline v1.0.8 - by entropy 2020 on *:open:?:*:{ var %pm = $+(pm,$nick) if ($dialog(%pm)) { dialog -x %pm pm } dialog -m %pm pm set $eval($+(%,title.,$nick),1) New Query ( $+ $network $+ ) set $eval($+(%,host.,$nick),1) $gettok($fulladdress,2,33) .timer -om 1 100 window -h $nick } dialog -l pm { title "" size -1 -1 214 62 option dbu notheme text "", 1, 5 5 203 36 button "Accept", 2, 134 45 37 12 button "Decline", 3, 171 45 37 12, ok } on *:dialog:pm*:init:0:{ var %a = 1, %allchans, %g = $mid($dname,3) while ($comchan(%g,%a)) { %allchans = %allchans $v1 inc %a } dialog -t $dname $eval($+(%,title.,%g),2) did -ra $dname 1 New Private Message from: $crlf $+ %g ( $+ $eval($+(%,host.,%g),2) $+ ) $+ $crlf $+ $crlf $+ Common channels: $iif(%allchans == $null,None,$v1) $crlf $+ Would you like to Accept or Decline? } on *:dialog:pm*:sclick:2,3:{ var %g = $mid($dname,3) if ($did == 2) { window -raw3 $mid($dname,3) | dialog -x $dname } else { window -c $mid($dname,3) | echo -a * Closed PM to $mid($dname,3) (declined) } unset $+(%,title.,%g) $+(%,host.,%g) }
Changelog:
- v1.0.8 (8/15/20)
Fixed the hostname not working
- v1.0.7 (2/23/20)
Fixed the $comchan call to undefined variable
- v1.0.6 (2/19/20)
Fixed some stuff (working good now)
- v1.0.8 (8/15/20)
Fixed the hostname not working
- v1.0.7 (2/23/20)
Fixed the $comchan call to undefined variable
- v1.0.6 (2/19/20)
Fixed some stuff (working good now)