Skip to content
Snippets Groups Projects
Commit 7c16427e authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Limit poll comments to configured lines-per-message limit for user's sec level

parent 2727150c
No related branches found
No related tags found
No related merge requests found
...@@ -48,8 +48,14 @@ var poll = { field_list: [] }; ...@@ -48,8 +48,14 @@ var poll = { field_list: [] };
if(!(poll.subject = prompt("Poll question"))) if(!(poll.subject = prompt("Poll question")))
exit(); exit();
var comments = 0;
var comment; 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) if(js.global.console && console.aborted)
exit(1); exit(1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment