@verb #1371:"@addpoll" none none none rxdo #7153 @program #1371:"@addpoll" none none none "Usage: @addpoll to this" " -=> Allows you to add a poll, specifying the question and duration of it." this:update_usage(verb, player) if (ban = this:check_banned_add(player)) player:tell("Sorry, you have been banned from adding a poll until ", ctime(ban), ".") endif done = 0 for x in (this.polls) if (x[2] == player) done = done + 1 endif endfor if (done >= this.max_polls) player:tell("Sorry, you have already reached the current limit of ", this.max_polls, " per player. Either delete one, or wait for it to expire.") else que = $command_utils:read("the question you wish to ask") if (!(time = #1371:get_time($command_utils:read("the length you wish your poll to last (i.e. 1 hour, 1 day, 1 week)")))) player:tell("Sorry, that is not a valid time duration. A valid time expression is ` '. Duration can be 'hour', 'day', or 'week'. Polls can last for a maximum of 2 weeks.") return endif this.polls = {@this.polls, {que, player, time, 0, 0, 0, {}}} player:tell("Poll #", length(this.polls), " added. It will expire on ", ctime(time), ".") endif "Last modified by Absolute (#7153) on Sat Sep 12 01:35:40 1998 EDT." .