More bug squashing

Contrast_Picker
Arcidayne 9 years ago
parent a4801bf303
commit 4effcd90a0

@ -120,39 +120,50 @@ end
function noteeditor(str) function noteeditor(str)
local note, note_to, note_subj, note_to_send = false, false, false, false local note, note_to, note_subj, note_to_send = false, false, false, false
if str == "new" then if str == "new" then
note_to = utils.inputbox("To whom are you writing the note?", "To list", "all") note_to = utils.inputbox("To whom are you writing the note?", "To list", "all")
if note_to then if note_to then
note_to_send = "note write " .. note_to note_to_send = "note write " .. note_to
note_subj = utils.inputbox("What is the subject of your note?", "Subject")
if not note_subj then
note_subj = ".q"
note_to_send = "echo Note cancelled!"
end -- end note_subj
else else
note_to_send = "note write all" note_to_send = "echo Note cancelled!"
end end -- end note_to
note_subj = utils.inputbox("What is the subject of your note?", "Subject")
if not note_subj then
note_subj = ""
end
elseif str == "reply" then elseif str == "reply" then
note_to = utils.inputbox("To which note are you replying?", "Note number") note_to = utils.inputbox("To which note are you replying?", "Note number")
note_to_send = "note reply " .. note_to or "" if note_to then
note_to_send = "note reply " .. note_to or ""
else
note_to_send = "echo Note cancelled!"
end -- end note_to
end end
Send(note_to_send) Send(note_to_send)
if note_subj then if note_to_send ~= "echo Note cancelled!" then
Send(note_subj) if note_subj then
end Send(note_subj)
end
note = utils.editbox("Write your note.", "Note Writer Box") note = utils.editbox("Write your note.", "Note Writer Box")
if note then if note then
Send(".c") Send(".c")
for line in note:gmatch("[^%c]+%c?") do for line in note:gmatch("[^%c]+%c?") do
Send(note_wrap(line)) Send(note_wrap(line))
Send(" ") Send(" ")
end
Send(".s")
else
Send(".q")
end end
Send(".s")
else
Send(".q")
end end
end end
]]> ]]>

Loading…
Cancel
Save