rendered paste bodymenu menubar {
-
Auto Greet:{ dialog -dm auto_greet auto_greet }
}
dialog Auto_Greet {
title "Auto Greet"
size -1 -1 150 149
option dbu
button "Add User", 1, 95 5 46 12
button "Remove User", 2, 95 24 46 12
edit "", 3, 6 94 81 16, multi autovs
button "OK", 4, 54 132 46 12, ok
text "Send By:", 6, 95 43 46 8
radio "Notice", 7, 95 78 46 12, group left
radio "Message", 8, 95 66 46 12, left
radio "Describe", 9, 95 54 46 12, left
list 10, 6 6 81 85, size hsbar vsbar
radio "Enable Auto Greet", 11, 7 117 55 12, group left
radio "Disable Auto Greet", 12, 86 117 55 12, left
button "Save Changes", 13, 91 94 50 15
box "", 14, 89 37 58 54
box "", 15, 1 -1 148 148
box "", 16, 3 113 144 17
}
on *:dialog:auto_greet:sclick:*: {
if ($did == 1) {
set %user $$?="Select User"
set %msg $$?="Greet Message"
write $+(",$scriptdir,autogreet.txt,") %user %msg | did -r auto_greet 10 | loadbuf -ot auto_greet 10 $+(",$scriptdir,autogreet.txt,")
unset %user
unset %msg
}
if ($did == 2) {
var %ruser = $?="Select User"
if (%ruser) write $+(-ds,%ruser) $+(",$scriptdir,autogreet.txt,"if) | did -r auto_greet 10 | loadbuf -ot auto_greet 10 $+(",$scriptdir,autogreet.txt,")
unset %ruser
}
if ($did == 7) {
set %send NOTICE | echo -a 4A14uto 4G14reet set send by: %send
}
if ($did == 8) {
set %send MSG | echo -a 4A14uto 4G14reet set send by: %send
}
if ($did == 9) {
set %send DESCRIBE | echo -a 4A14uto 4G14reet set send by: %send
}
if ($did == 11) {
set %agreet ENABLED | echo -a 4A14uto 4G14reet Is %agreet
}
if ($did == 12) {
set %agreet DISABLED | echo -a 4A14uto 4G14reet Is %agreet
}
if ($did == 4) {
dialog -x auto_greet auto_greet
}
if ($did == 13) {
did -a auto_greet 10 $did(auto_greet,3).text | did -r auto_greet 3 | savebuf -o 0 auto_greet 3 $+(",$scriptdir,autogreet.txt,")
}
}
on *:DIALOG:auto_greet:init:0: {
if (%send == NOTICE) { did -c auto_greet 7 }
if (%send == MSG) { did -c auto_greet 8 }
if (%send == DESCRIBE) { did -c auto_greet 9 }
if (%agreet == ENABLED) { did -c auto_greet 11 }
if (%agreet == DISABLED) { did -c auto_greet 12 }
loadbuf -ot auto_greet 10 $+(",$scriptdir,autogreet.txt,")
}
on *:dialog:auto_greet:dclick:10: {
did -ra auto_greet 3 $did(auto_greet,10).seltext | did -d auto_greet 10 $did(auto_greet,10).sel
}
on *:join:#: {
if (%agreet == ENABLED) && ($nick isin $read(autogreet.txt)) && (%send != DESCRIBE) {
. %send $nick $gettok($read(autogreet.txt,w, $($+(*,$nick,*),2)),2-,32)
}
elseif (%agreet == ENABLED) && ($nick isin $read(autogreet.txt)) && (%send == DESCRIBE) {
. %send # $gettok($read(autogreet.txt,w, $($+(*,$nick,*),2)),2-,32)
}
else { halt }
}
on *:start: {
write -iL1 $+(",$scriptdir,autogreet.txt,") DOUBLECLICK USER TO EDIT
write -iL2 $+(",$scriptdir,autogreet.txt,") -------------------------------------
set %send msg
set %agreet enabled
echo -a 4A14uto 4G14reet Created By 4TrusTkill
echo -a 14Goto Menubar>Auto Greet and everything should be self explanatory
echo -a 14Any Problems Contact Me At:12 irc.mizoworld.com : channel #MW-Script
}