menu * { Email: //dialog -dm es es } dialog es { title "iChunk|'s Email System" size -1 -1 182 176 option dbu tab "Send/Read Emails", 1, 2 -1 179 175 box "Read Email", 3, 4 98 174 74, tab 1 edit "", 10, 35 36 141 37, tab 1 multi vsbar return edit "", 8, 35 23 140 10, tab 1 text "Note: If the person you are sending this message to does not use this email system then the message will not be sent.", 11, 8 82 146 14, tab 1 box "Send Email", 4, 5 14 174 84, tab 1 text "To:", 7, 9 24 9 8, tab 1 text "Message:", 9, 8 37 25 8, tab 1 button "Delete", 12, 35 108 75 12, tab 1 text "From:", 16, 7 122 15 8, tab 1 edit "", 17, 35 121 142 10, disable tab 1 text "Message:", 18, 7 135 25 8, tab 1 edit "", 19, 35 134 142 35, disable tab 1 multi hsbar return text You have %messages messages, 14, 111 110 64 8, tab 1 right button "Send", 34, 35 73 140 9, tab 1 tab "Friends/Ignore List", 2 list 20, 53 21 120 65, tab 2 size vsbar edit "", 21, 7 21 45 10, tab 2 multi autohs box "Friends List", 22, 5 13 172 77, tab 2 button "Add", 24, 11 32 37 12, tab 2 box "Ignore List", 23, 5 91 172 76, tab 2 button "Delete All", 27, 11 60 37 12, tab 2 button "Delete All", 32, 11 138 37 12, tab 2 button "Delete", 31, 11 124 37 12, tab 2 button "Add", 28, 11 110 37 12, tab 2 edit "", 29, 8 99 45 10, tab 2 multi autohs list 30, 54 98 120 65, tab 2 size vsbar button "Delete", 25, 11 46 37 12, tab 2 menu "File", 5 item "Exit", 6, 5, cancel } on *:TEXT:*:?:{ if (iChunk|'s Email System* iswm $1-) { if ($nick isin %ignore) { HALT | close -m $nick } write newmessages.txt $nick $4- | close -m $nick | inc %messages } } on *:DIALOG:es:init:0:{ did -a $dname 17 $gettok($read(newmessages.txt,1),1,32) did -a $dname 19 $remove($read(newmessages.txt,1),$gettok($read(newmessages.txt,1),1,32)) set %viewing 1 var %x 1 while ($lines(friends.txt) >= %x) { //did -a es 20 $read(friends.txt, %x) inc %x } var %x 1 while ($lines(ignore.txt) >= %x) { //did -a es 30 $read(ignore.txt, %x) inc %x } } on *:DIALOG:es:sclick:*:{ if ($did == 34) { if ($did(8) == $null) { /did -a $dname 8 You have to enter a person to send the message to. | halt } if ($did(10) == $null) { /did -a $dname 10 You have to enter a message to send. | halt } else { .msg $did(8) iChunk|'s Email System: $did(10) } } if ($did == 12) { if (%messages == 0) { HALT } write -ds $+ $qt($did(17) $did(19)) newmessages.txt dec %messages did -ra $dname 14 You have %messages messages did -ra $dname 17 $gettok($read(newmessages.txt,%viewing),1,32) did -ra $dname 19 $remove($read(newmessages.txt,%viewing),$gettok($read(newmessages.txt,%viewing),1,32)) } if ($did == 24) { if (!$did(21)) { //noop $input(You have to enter a name!,o,Error!) | halt } if ($did(21) isin %friends) { //noop $input($did(21) is already on your friends list!,o,Error!) | halt } //did -a es 20 $did(21) | write friends.txt $did(21) | set %friends %friends $did(21) | //did -r es 21 } if ($did == 25) { write -ds $+ $read(friends.txt,$did(20).sel) friends.txt did -d $dname 20 $did(20).sel var %x 1 unset %friends while ($lines(friends.txt) >= %x) { //set %friends %friends $read(friends.txt,%x) inc %x } } if ($did == 27) { //did -r $dname 20 | //unset %friends | //.remove friends.txt } if ($did == 28) { if (!$did(29)) { //noop $input(You have to enter a name!,o,Error!) | halt } if ($did(29) isin %ignore) { //noop $input($did(29) is already on your ignore list!,o,Error!) | halt } //did -a es 30 $did(29) | write ignore.txt $did(29) | set %ignore %ignore $did(29) | //did -r es 29 } if ($did == 32) { //did -r $dname 30 | //unset %ignore | //.remove ignore.txt } if ($did == 31) { write -ds $+ $read(ignore.txt,$did(30).sel) ignore.txt did -d $dname 30 $did(30).sel var %x 1 unset %ignore while ($lines(ignore.txt) >= %x) { //set %ignore %ignore $read(ignore.txt,%x) inc %x } } } on *:DIALOG:es:dclick:20:{ set %search $did(20).seltext | //ison $did(20).seltext .timer 1 0.3 //noop $!input(%search is currently %output to IRC.,o,Info) } raw 303:*:{ set %output $iif(!$2,not connected,connected) }