Peace & Protection 4.00 — File Browser
PeaceProtection4.00v4.0 / PeaceProtection4.00v4.0 / SCRIPT / register.mrc
register.mrc — 8.67 KB — Download this file
; #= P&P.temp -rs
; ########################################
; Peace & Protection
; Register, bug report, etc.
; ########################################
dialog bugrep {
title "Bug report and feedback"
size -1 -1 500 385
text "To report a bug or problem with P&&P, use the 'Report a bug' section. To suggest features, or give other feedback, use the 'General feedback' section.", 1, 10 10 480 40
radio "Report a bug", 2, 10 50 100 25, push
radio "General feedback", 3, 120 50 100 25, push
box "", 4, 10 80 480 235
text "Please write a detailed description of the bug, including when it occurs and how it can be reproduced. Include any information that you think may help in reproducing the bug.", 5, 20 100 460 40
edit "", 6, 20 140 460 80, return vsbar multi
;;; If you request a reply, you will recieve a response to your feedback. If you do not request a reply, we will only contact you if more information is needed.
text "Please provide your e-mail in case we need to contact you. Due to limited time, replies will only be sent if more information is needed. We apologize that we cannot reply to everyone.", 7, 20 230 460 50
text "Your e-mail:", 8, 20 285 60 20, right
edit "", 9, 83 281 200 22, autohs
;;; hidden
check "Request a reply", 10, 300 284 150 16, disable hide
text "Press the Next button to continue.", 11, 20 325 300 20
button "Next >>", 12, 20 350 120 25, disable default
text "To aid us in finding and fixing the bug, you may wish to send us additional information about your computer and script configuration.", 13, 20 100 460 30, hide
check "Send basic system info", 14, 20 139 200 16, hide
check "Send P&&P and mIRC configuration", 15, 20 189 200 16, hide
check "Send recent debug.log", 16, 20 249 200 16, hide
text "This is information on mIRC version, operating system, and other very basic information, with no security risk.", 17, 220 140 240 40, hide
text "This includes most P&&P and mIRC settings, as well as the userlist. It includes the mIRC 'perform' section and any auto-events, so be warned, if you use these for passwords.", 18, 220 190 240 55, hide
text "This includes ALL data sent to and from mIRC since you last started mIRC. It will contain all non-DCC chat and any passwords, so only send this if absolutely needed.", 19, 220 250 240 60, hide
text "Press the Send button to send your bug report.", 20, 20 325 300 20, hide
button "Send!", 21, 20 350 120 25, hide disable OK
button "<< Back", 22, 190 350 120 25, hide
text "Please enter your feedback and comments.", 23, 20 100 460 40, hide
text "Press the Send button to send your feedback.", 24, 20 325 300 20, hide
button "Cancel", 100, 360 350 120 25, cancel
}
alias _bug set %.option $1 | _dialog -md bugrep bugrep
on *:DIALOG:bugrep:init:*:{
if ($exists($mircdirdebug.log) == $false) did -b $dname 16,19
if (%.option) {
did -c $dname 3
_clickbtn 3 $dname
}
else {
did -c $dname 2,14
did -f $dname 6
}
unset %.option
}
on *:DIALOG:bugrep:sclick:21:{
%_br.file = $_temp(bug)
window -c @.bug
window -hln @.bug
if ($did(2).state) {
aline @.bug Subject: [AUTO] Bug report
}
else {
aline @.bug Subject: [AUTO] Feedback
}
aline @.bug X-Mailer: Peace and Protection $:ver
if ($did(9)) {
aline @.bug From: $did(9)
aline @.bug Reply-to: $did(9)
}
aline @.bug $lf
var %ln = 1,%num = $did(6).lines
:loop
if ($left($did(6,%ln).text,1) == $null) aline @.bug $lf
else aline @.bug $did(6,%ln).text
if (%ln < %num) { inc %ln | goto loop }
aline @.bug $lf
if ($did(10).state) { aline @.bug (reply requested) | aline @.bug $lf }
if ($did(2).state) {
if ($did(14).state) {
aline @.bug mIRC: $version $+ , $bits bit
aline @.bug EXE: $mircexe
aline @.bug INI: $mircini
aline @.bug DIR: $mircdir
if ($ip == $null) aline @.bug IP: (unknown)
else aline @.bug IP: $ip
aline @.bug Nickname: $me
if ($server == $null) aline @.bug Server: (not connected)
else aline @.bug Server: $server : $port
aline @.bug OS: $os
aline @.bug Timestamp: $ctime / $ticks
aline @.bug Profile: %!user
aline @.bug IAL: $ial
aline @.bug $lf
}
if ($did(15).state) {
saveini
aline @.bug *** $mircini
loadbuf @.bug " $+ $mircini $+ "
aline @.bug $lf
aline @.bug *** $mircdirconfig\profiles.ini
loadbuf @.bug " $+ $mircdirconfig\profiles.ini $+ "
aline @.bug $lf
aline @.bug *** $_cfg(config.ini)
loadbuf @.bug " $+ $_cfg(config.ini) $+ "
aline @.bug $lf
aline @.bug *** $_cfg(cfgvar.dat)
loadbuf @.bug " $+ $_cfg(cfgvar.dat) $+ "
aline @.bug $lf
aline @.bug *** $_cfg(users.mrc)
loadbuf @.bug " $+ $_cfg(users.mrc) $+ "
aline @.bug $lf
aline @.bug *** $_cfg(display.dat)
loadbuf @.bug " $+ $_cfg(display.dat) $+ "
aline @.bug $lf
}
if ($did(16).state) {
aline @.bug *** $mircdirdebug.log
loadbuf 500 @.bug " $+ $mircdirdebug.log $+ "
aline @.bug $lf
}
aline @.bug *** End of Data
}
_bugstart $did(2).state
}
alias _bugstart {
_progress.1 Sending $iif($1,bug report...,feedback...)
_progress.2 0 Connecting to pairc.com...
sockclose bugrep
sockopen bugrep smtp.pairc.com 25
}
on *:DIALOG:bugrep:sclick:100:_unload register
on *:DIALOG:bugrep:sclick:*:_clickbtn $did $dname
alias -l _clickbtn {
if (($1 == 2) || ($1 == 22)) {
;;; 10
did -v $2 5,6,7,8,9,11,12
did -h $2 13,14,15,16,17,18,19,20,21,22,23,24
did -t $2 12
did -f $2 6
}
elseif ($1 == 3) {
;;; 10
did -v $2 6,7,8,9,21,23,24
did -h $2 5,11,12,13,14,15,16,17,18,19,20,22
did -t $2 21
did -f $2 6
}
elseif ($1 == 12) {
did -v $2 13,14,15,16,17,18,19,20,21,22
;;; 10
did -h $2 5,6,7,8,9,11,12,23,24
did -t $2 21
did -f $2 14
}
}
on *:DIALOG:bugrep:edit:*:{
if (($did($did).lines > 1) || ($did($did).text != $null)) {
if ($did == 6) did -e $dname 12,21
;;; else did -e $dname 10
}
else {
if ($did == 6) did -b $dname 12,21
;;; else did -b $dname 10
}
}
on *:SOCKOPEN:bugrep:{
if ($sockerr) _bugresend Error connecting to server
_progress.2 0 Initiating transfer...
}
on *:SOCKWRITE:bugrep:{
if ($sockerr) _bugresend Unexpected socket error: Error $sockerr
if (($sock(bugrep).mark isnum) && ($sock(bugrep).mark > 0)) {
var %ln = $ifmatch,%line = $line(@.bug,$ifmatch)
if (%ln \\ 5) _progress.2 $int($calc(%ln * 100 / ($line(@.bug,0) + 2))) Sending data...
if ($left(%line,1) == .) sockwrite -n bugrep . $+ %line
else sockwrite -nt bugrep %line
inc %ln
if (%ln > $line(@.bug,0)) {
sockwrite -n bugrep .
sockmark bugrep 0
}
else sockmark bugrep %ln
}
}
on *:SOCKREAD:bugrep:{
var %data
:readmore
sockread %data
if ($sockerr) _bugresend Unexpected socket error: Error $sockerr
if ($sockbr) {
tokenize 32 %data
if ($1 == 220) sockwrite -n bugrep HELO $iif(. isin $host,$host,$iif($longip($ip),$ip,example.com))
elseif ($1 isnum 400-599) _bugresend Error from mail relay: $2-
elseif ($1 == 354) {
; Send text
sockmark bugrep 2
sockwrite -n bugrep $line(@.bug,1)
}
elseif ($1 isnum 250-259) {
; From/to
if ($sock(bugrep).mark == $null) {
sockwrite -n bugrep MAIL FROM:<feedback@pairc.com>
sockmark bugrep a
}
elseif ($sock(bugrep).mark == a) {
sockwrite -n bugrep RCPT TO:<feedback@pairc.com>
sockmark bugrep b
}
elseif ($sock(bugrep).mark == b) {
sockwrite -n bugrep DATA
sockmark bugrep c
}
elseif ($sock(bugrep).mark == 0) {
_progress.2 99 Disconnecting...
sockwrite -n bugrep QUIT
}
}
goto readmore
}
}
on *:SOCKCLOSE:bugrep:{
if ($sock(bugrep).mark == 0) {
window -c @.bug
_progress.2 100 Feedback sent, thank you!
_unload register
}
else _bugresend Socket closed unexpectedly: Error $sockerr
}
alias -l _bugresend {
sockclose bugrep
window -c @Progress
_dialog -am bugresend bugresend
did -a bugresend 2 $1-
$$$
}
dialog bugresend {
title "Error sending feedback"
size -1 -1 400 120
text "There was an error sending your feedback:", 1, 10 10 400 20
text "", 2, 10 35 400 20
text "You may try to resend, or cancel your feedback.", 3, 10 60 400 20
button "Retry", 10, 10 85 100 25, OK default
button "Cancel", 11, 290 85 100 25, cancel
}
on *:DIALOG:bugresend:sclick:10:{
_bugstart 0
}
on *:DIALOG:bugresend:sclick:11:{
window -c @.bug
_unload register
}