So, after making more than my share of tea-rounds at work (I’m an addict) I decided to task one of our interns with making an IRC bot to determine who’s round it is. I just thought I’d share the instructions I gave him:
Your mission, if you choose to accept it, is to make an IRC bot to help distribute the tea rounds evenly. The rules for the bot are as follows:
1) Someone types the text *I NEED TEA!* or *I NEED COFFEE!*.
2) This starts an invisible timer going.
3) Other people then have 30 seconds to type *I NEED TEA!* or *I NEED COFFEE!*.
4) At the end of the 30 seconds a list of who wants what is compiled and the bot then types it out. It also randomly picks someone from the list to make the round. For example:
Humans! Time is up! Dave, Valentin and Tom want tea. Nick wants a coffee. The round is to be made by….
5) If only a total of 2 people (including the tea-round instigator) are in then the rules are such that the instigator has to make the round for himself and the other person. Only if it’s 3 or more people is a random tea-round-maker generated. Bot text readout example:
Humans! Time is up! Only Dave and Nick wanted drinks, but because Nick instigated the round it is HIM who must make it.
Other things to look out for:
- make sure it only parses the correct text, but don’t worry about case-sensitivity.
- give it a name and a personality. Colin or Edith or something.
- perhaps thinking about adding a high-score system so if someone types a command like “Edith, what are the scores?”. It then lists how many tea-rounds everyone has made in descending. Again, make it funny and feel free to add text to this process.