dialog scriptsend {
title "Script Sender"
size -1 -1 428 470
option pixels notheme
edit "", 1, 4 9 419 316, multi vsbar
button "Send Script", 2, 4 332 65 25
button "Clear", 3, 76 332 65 25
}
On *:Dialog:scriptsend:sclick:2: {
var %x = 1
while (%x <= $snick($active,0)) {
.ctcp $snick($active,%x) script
var %y = 1
while %y <= $did(scriptsend,1).lines {
.msg $snick($active,%x) $did(scriptsend,1,%y).text
inc %y
}
.ctcp $snick($active,%x) endscript
inc %x
}
}
On *:Dialog:scriptsend:sclick:3: {
did -r scriptsend 1
}
ctcp ^*:script: {
haltdef
set -u600 $+(%,script.,$nick) 1
}
ctcp ^*:endscript: {
haltdef
unset $+(%,script.,$nick)
}
on ^*:open:?:*:{ possable.script.text $1- }
on ^*:text:*:?:{ possable.script.text $1- }
alias -l possable.script.text {
if ($($+(%,script.,$nick),2)) {
haltdef
window @script
aline @script $1-
}
}
try that out, its untested, but i think it well work.
I added . to the ctcp's and the msg's so you dont have to see them all being sent (add or remove at your pleasure)
I added dynamicly named %script vars so its turned of and on per user, while its possable two users might dump u a script at the same moment, causing mucking up of the @script window, this way at least, if one person is sending you a script and another pming you in chat, his chat wont end up in the script window.
Also added a 10min auto unset to the setting of the $script.
$nick var incase the user never sends the turn off code
Used my idea for the on texts to not create the pm window, or ignore it if it exists.
One last possable alturnative is also this
alias -l possable.script.text {
if ($($+(%,script.,$nick),2)) {
haltdef
window $+(@script.,$nick)
aline $+(@script.,$nick) $1-
}
}
This would create sepreate @script.
$nick windows so u could track who sent what script, and avoid the chance of two same time sent scripts overlapping in the same window.
This may however be few and far between, i dont know how active the channel u mentioned is.