github/hubot-scripts — pull request #1604 by inhumantsar (2014-10-17 21:26:18+00:00)
Title: Added support for multiple actions

We wanted to be able to trigger multiple events in a sequence with eardropping but the existing implementation would trigger events in an almost random order. Added an order parameter to the task object and set up a bit to sort tasks that match the current eardrop trigger. I'm quite new to coffeescript and hubot programming so there's probably some room to refactor my additions.

The ordering still isn't 100% accurate. Hubot will trigger the tasks in the correct sequence but target actions may appear to the user out of order. For example, when hubot hears "kaboom" it should trigger "how many days since kaboom?", then echo and finally reset the days since kaboom counter to 0. On the server side, this executes in the desired order but on client side, those messages might be received out of sequence.