diff --git a/exec/postpoll.js b/exec/postpoll.js index f31a0b83d51001aa33f87e0f47655d37c66e7487..e5304e79e81eac775971a75ed04e25bc48d8c3c2 100644 --- a/exec/postpoll.js +++ b/exec/postpoll.js @@ -48,8 +48,14 @@ var poll = { field_list: [] }; if(!(poll.subject = prompt("Poll question"))) exit(); +var comments = 0; var comment; -while(comment = prompt("Comment [done]")) poll.field_list.push({ type: SMB_COMMENT, data: comment}); +while(comment = prompt("Comment [done]")) { + if(js.global.bbs && comments >= user.limits.lines_per_message) + break; + poll.field_list.push({ type: SMB_COMMENT, data: comment}); + comments++; +} if(js.global.console && console.aborted) exit(1);