Skip to content

Instantly share code, notes, and snippets.

@danopia
Created January 5, 2009 19:48
Show Gist options
  • Save danopia/43508 to your computer and use it in GitHub Desktop.
Save danopia/43508 to your computer and use it in GitHub Desktop.
69 parser.command(e, 'join') do |c, params|
70 if started
71 irc.msg(e.recipient, "#{who}: We are already playing!")
72 elsif players.index who != nil
73 irc.msg(e.recipient, "#{who} is already in the game.")
74 else
75 irc.msg(e.recipient, "#{who} has joined the game.") if players.size > 0
76 irc.msg(e.recipient, "#{who} has started a new game. Use !join to join it and #{who} may use !start to begin it at any time.") if players.size == 0
77 add_player who
80 end
81 end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment