luabot icon indicating copy to clipboard operation
luabot copied to clipboard

Plugin for polls / votings

Open aperezdc opened this issue 10 years ago • 4 comments

Must support (at least):

  • One active poll per chatroom.
  • A poll is a set of possible arbitrary choices (e.g. do not limit the number of possible choices).
  • Simple choice polls (each JID can vote only for a single choice)
  • Each JID can only vote once (to avoid multiple voting).
  • Querying poll results.

Desirable extras:

  • Multiple active polls per chatroom.
  • Concealing results until “everybody” has voted (needs being able to define who is “everybody”: for example the people in the chatroom when the poll is started, or a fixed list of JIDs)

Things that would be super cool:

  • Web UI to ease entering polls, their choices, the lists of people/JIDs who can vote in each poll...
  • Showing poll results in the aforementioned web UI.

The proposed interface for managing polls is:

  • [ ] poll <identifier> create <title-text>
  • [ ] poll <identifier> add <option-text>
  • [ ] poll <identifier> del <option-number>
  • [ ] poll — List available, non-active polls.
  • [ ] poll <identifier> — Shows a poll.
  • [ ] poll <identifier> census [<jid...>] — Shows or defined who can vote in the poll. If a census is not specified anyone can vote.
  • [ ] poll <identifier> pending — Shows JIDs pending to vote
  • [ ] poll <identifier> start — Starts a poll.
  • [ ] poll <identifier> end — Closes a poll.

And for voting in polls:

  • [ ] vote — Shows a list of active polls.
  • [ ] vote <identifier> — Shows a list of polls options.
  • [ ] vote <identifier> <option-number> — Votes in a poll.

A poll <identifier> is global, it does not depend on the active room. A poll created from a room has a “home” room, and if only one poll is active for a given room, short forms for vote can be used, where the <identifier> is some kind of wildcard (e.g. vote * 4).

aperezdc avatar Oct 02 '15 15:10 aperezdc

Ideally, this would use the key-value store defined in issue #5

aperezdc avatar Oct 06 '15 18:10 aperezdc

Also, this plugin will use the command registration interface described in issue #7

aperezdc avatar Oct 14 '15 18:10 aperezdc

This looks really full featured, if wanting something simpler (I suppose that would be enough), look at: http://lists.alioth.debian.org/pipermail/meetbot-devel/2011-June/000009.html https://github.com/ahenobarbi/Gentoo-Council/commits/MeetBotOnly

tanty avatar Oct 15 '15 19:10 tanty

@tanty Thanks for the links, I didn't know about this fork of MeetBot. I do agree that it is interesting to have some way of doing polls while in meetings, and getting the results as part of the meeting minutes. With the current implementation of the bot, it is possible for a plugin to export functions (by attaching them in a table to bot.plugin.<pluginname>, and then other plugins can use them. I think the nicest way is to do something like that, and make the meetings plugin reuse the implementation of the polls plugin.

aperezdc avatar Oct 15 '15 20:10 aperezdc