From: Daniel Moore Date: 2009-10-17T01:34:11+09:00 Subject: [QUIZ] IRC Teams (#221) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- The three rules of Ruby Quiz: 1. Please do not post any solutions or spoiler discussion for this quiz until 48 hours have elapsed from the time this message was sent. 2. Support Ruby Quiz by submitting ideas and responses as often as you can. 3. Enjoy! Suggestion: A [QUIZ] in the subject of emails about the problem helps everyone on Ruby Talk follow the discussion. Please reply to the original quiz message, if you can. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - RSS Feed: http://rubyquiz.strd6.com/quizzes.rss Suggestions?: http://rubyquiz.strd6.com/suggestions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- ## IRC Teams (#221) Tashi dele Rubyists, This week's quiz was suggested by [Martin DeMello][1] A common feature in IRC-based games is the ability to create and join teams. The game bot sits in the channel and watches for messages in a certain format, which it interprets as commands. Write a small gamebot that accepts the following commands: create team join leave team show teams show team show my team delete team reset Here's a typical transcript create team ruby - created team ruby - create team python - created team python - show teams teams: ruby, python show team ruby team ruby: foo show my team bar is in team python join ruby baz is now in team ruby show team ruby team ruby: foo, baz Think up some useful extensions, such as the ability to join a user rather than a team, and restricting some commands like reset to ops. There are plenty of IRC bot libraries out there, go explore! If one already does team formation, that's cheating, though :) Have fun! [1]: http://zem.novylen.net -- -Daniel http://rubyquiz.strd6.com