Skip to content

Instantly share code, notes, and snippets.

Last active May 7, 2016
What would you like to do?
MetaBrainz meeting botbot plugin pseudocode

MB meeting botbot plugin

Config options:

  • [meeting start time] (UTC) = "19:00"
  • [meeting end time] (UTC) = "20:00"
  • [meeting start msg] = "<BANG>"
  • [meeting end msg] = "</BANG>"
  • [meeting managers] = "Freso;ruaok"
  • [report time] = 180
  • [report warn time] = 60
  • [report end msg] = "Alright. Thanks everyone. :)"


State 0:

  • Wait for message containing "order for meeting*:"
  • Listify all nicks seperated by comma in [meeting order]
  • If time = [meeting start time], switch to state 1

State 1 (user reports):

  • Grab agenda items from title after "agenda:" with assigned users in parentheses after item, multiple user seperated by slash (eg. "New Search Servers? (zas), AE elections (Freso/reosarevok)"
  • Write raw agenda to string [agenda]
  • Write agenda items to dictionary [agenda dict]
  • Send "[meeting start msg]"
  • Send "Meeting order: [meeting order]"

{For each [user] in [meeting order]}

  • Send "Go, [name]!"

  • Start timer running for [report time] seconds

  • Run until either time is up or [name] sends "fin*" or user in list of [meeting managers] sends "fin."

  • If [report warn time] is non-zero and < [report time] and timer is [report warn time] send "[user], [report warn time] seconds left!" (Should print time in minutes, if divisible)

  • If [agenda dict] not empty, switch to state 2 else switch to state 3

State 2:

  • Send [agenda]

{For each [item]:[users] in [agenda dict]}

  • Send "[users]: [item]"
  • Until user in [meeting managers] sends "next item*"
  • If time = [meeting end time] - 1 minute, send "Meeting time's nearly over, do you want more time?"
  • If user in [meeting managers] sends "more time!", set [meeting end time] to "never"
  • If current time = [meeting end time], switch to state 3
  • If user in [meeting managers] sends [meeting end msg], switch to state 0

State 3:

  • Send [meeting end msg]
  • Switch to state 0


  • Voting system (collect +1s/-1s)
  • Automatically send meeting digest template to Freso
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment