end.lastspoke — File Browser
end.lastspokev1.0 / end.lastspokev1.0 / end.lastspoke.mrc
end.lastspoke.mrc — 6.5 KB — Download this file
alias F6 {
dialog -ma end.LS.config end.LS.config
}
alias end.LS.config {
dialog -ma end.LS.config end.LS.config
}
on *:start: {
set %end.LS.Fkey $gettok($read($scriptdir $+ end.lastspoke.mrc,1),2,32)
if (%end.LS.scriptOFF == $null) { set %end.LS.scriptOFF 0 }
if (%end.LS.trigOFF == $null) { set %end.LS.trigOFF 0 }
if (%end.LS.trigger == $null) { set %end.LS.trigger !end.lastspoke }
if (%end.LL.trigger == $null) { set %end.LL.trigger !end.lastline }
echo -a 8*4*12* end.lastspoke v1.0 was succesfully loaded
echo -a 8*4*12* to config (change triggers etc) press %end.LS.Fkey
echo -a 8*4*12* if you already have %end.LS.Fkey assgined in another script, type /end.LS.config
}
on *:TEXT:*:#: {
if (%end.LS.scriptOFF == 1) { halt }
if ($read(lastspoke.txt,s,$network $+ . $+ $address($nick,1)) != $null) { write -dl $+ $readn lastspoke.txt }
write lastspoke.txt $network $+ . $+ $address($nick,1) $replace($fulldate,$chr(32),.) $nick $chan $replace($1-,$chr(124),$chr(135),$chr(36),$chr(134))
if (%end.LS.trigOFF == 1) { halt }
if (($1 == %end.LS.trigger) && ($2 == $null)) { .notice $nick Usage: %end.LS.trigger <nick> | halt }
if (($1 == %end.LL.trigger) && ($2 == $null)) { .notice $nick Usage: %end.LL.trigger <nick> | halt }
if (($read(lastspoke.txt,s,$network $+ . $+ $address($2,1)) != $null) && ($1 == %end.LS.trigger) && ($2 == $nick)) { .notice $nick Are you schizophrenic? You - if anyone, should know when you last uttered a word | halt }
else if (($read(lastspoke.txt,s,$network $+ . $+ $address($2,1)) != $null) && ($1 == %end.LS.trigger) && ($2 != $null)) { .notice $nick I last saw $2 utter a word $duration($calc($ctime($fulldate)-$ctime($replace($gettok($read(lastspoke.txt,s,$network $+ . $+ $address($2,1)),1,32),.,$chr(32))))) ago in $gettok($read(lastspoke.txt,s,$network $+ . $+ $address($2,1)),3,32) $+ , using the name $gettok($read(lastspoke.txt,s,$network $+ . $+ $address($2,1)),2,32) ( $+ %end.LL.trigger $2 to see what he/she/(it?) said) }
else if ($1 == %end.LS.trigger && ($2 != $null) && ($address($2,1) == $null)) { .notice $nick Sorry, $2 doesn't seem to be online (or maybe $2 changed his/her nick?) }
else if ($1 == %end.LS.trigger && ($2 != $null)) { .notice $nick Sorry, $2 seems to be a quiet person, infact, I've never heard $2 utter a word! }
if (($read(lastspoke.txt,s,$network $+ . $+ $address($2,1)) != $null) && ($1 == %end.LL.trigger) && ($2 == $nick)) { .notice $nick Are you schizophrenic? You - if anyone, should know what the last line you wrote was | halt }
else if (($read(lastspoke.txt,s,$network $+ . $+ $address($2,1)) != $null) && ($1 == %end.LL.trigger) && ($2 != $null)) { .notice $nick The last line I saw $2 say was: $replace($gettok($read(lastspoke.txt,s,$network $+ . $+ $address($2,1)),4-,32),$chr(135),$chr(124),$chr(134),$chr(36)) }
else if ($1 == %end.LL.trigger && ($2 != $null) && ($address($2,1) == $null)) { .notice $nick Sorry, $2 doesn't seem to be online (or maybe $2 changed his/her nick?) }
else if ($1 == %end.LL.trigger && ($2 != $null)) { .notice $nick Sorry, I've got no records of $2 saying anything }
}
on *:dialog:end.LS.config:init:*: {
did -a end.LS.config 3 %end.LS.trigger
did -a end.LS.config 7 %end.LL.trigger
did -a end.LS.config 10 %end.LS.Fkey
if (%end.LS.scriptOFF == 1) { did -c end.LS.config 15 }
else { did -u end.LS.config 15 }
if (%end.LS.trigOFF == 1) { did -c end.LS.config 16 }
else { did -u end.LS.config 16 }
}
dialog end.LS.config {
title end.lastspoke config
size -1 -1 110 128
option dbu
box "Triggers:",1,3 2 104 78,
text "Set lastspoke trigger:",2,7 10 60 7,
edit "",3,6 17 98 11,
text "This trigger will tell the person when and where a person last said something",4,7 28 100 14
text "Set lastline trigger:",6,7 46 60 7,
edit "",7,6 53 98 11,
text "This trigger will tell the person what the last thing a person said was",8,7 64 100 14
box "Configkey",11,3 82 64 27,
text "Set configkey:",9,7 93 35 7
edit "",10,43 91 16 11,
box "Disable:",14,72 82 36 27,
check "Logging",15,75 90 30 7,
check "Triggers",16,75 98 30 7,
button "OK",12,19 113 30 13,ok
button "Cancel",13,61 113 30 13,cancel
}
on *:dialog:end.LS.config:sclick:15: {
if ($did(15).state == 1) { did -c end.LS.config 16 }
}
on *:dialog:end.LS.config:sclick:16: {
if ($did(16).state == 0) { did -u end.LS.config 15 }
}
on *:dialog:end.LS.config:sclick:12: {
if ($did(15).state == 1 && $did(15).state != %end.LS.scriptOFF) { set %end.LS.scriptOFF 1 | set %end.LS.trigOFF 1 | echo -a 8*4*12* end.lastspoke is now fully 4disabled | goto next }
if ($did(16).state == 0 && $did(16).state != %end.LS.trigOFF) { set %end.LS.trigOFF 0 | set %end.LS.trigOFF 0 | echo -a 8*4*12* end.lastspoke is now fully 3enabled | goto next }
if ($did(15).state == 0 && $did(15).state != %end.LS.scriptOFF) { set %end.LS.scriptOFF 0 | echo -a 8*4*12* logging is now 3enabled }
if ($did(16).state == 1 && $did(16).state != %end.LS.trigOFF) { set %end.LS.trigOFF 1 | echo -a 8*4*12* triggers are now 4disabled }
:next
if (%end.LS.trigger != $did(3) && $did(3) != $null) { set %end.LS.trigger $did(3) | echo -a 8*4*12* Lastspoke trigger succesfully updated }
if (%end.LL.trigger != $did(7) && $did(7) != $null) { set %end.LL.trigger $did(7) | echo -a 8*4*12* Lastline trigger succesfully updated }
if ($did(10) == $gettok($read($scriptdir $+ end.lastspoke.mrc,1),2,32)) { goto end }
else if ($did(10) == F1 || $did(10) == F2 || $did(10) == F3 || $did(10) == F4 || $did(10) == F5 || $did(10) == F6 || $did(10) == F7 || $did(10) == F8 || $did(10) == F9 || $did(10) == F10 || $did(10) == F11 || $did(10) == F12) { write -l1 $scriptdir $+ end.lastspoke.mrc alias $did(10) $chr(123) | set %end.LS.Fkey $did(10) | echo -a 8*4*12* Note: Your configkey is now %end.LS.Fkey $+ , however you need to reload the script for it to change (to do so, type /load -rs $scriptdir $+ end.lastspoke.mrc) }
else { set %end.LS.error $did(10) | did -r end.LS.config 10 | did -a end.LS.config 10 %end.LS.Fkey | dialog -ma end.LS.error end.LS.error | halt }
:end
unset %end.LS.error
}
on *:dialog:end.LS.error:init:*: {
did -a end.LS.error 2 " $+ %end.LS.error $+ " is not a valid configkey, please use only F keys (F1-F12)
}
dialog end.LS.error {
title end.lastspoke error
size -1 -1 86 50
option dbu
text "Error",1,4 4 78 7,center
text "",2,4 12 78 30,center
button "OK",3,28 32 30 13,ok
}