Merge pull request #3 from dopeghoti/master

Also adds some good alternate commands (em, ?).
Merge pull request #4 from dopeghoti/master

more refactoring to match from lists.
Added support for d%% to roll a d1000

An additional state ("subtype") is used, so that future dice that might need more than one character to define them can do so.
Fix single-choice commands.

Python interprets ('say') as 'say', not as a 1-element tuple.  You
have to put a trailing comma.  Forgot about this.  Fixed!
Start on primary functionality: game_master/RPS.

Right now the game master simply manages sessions and routes commands
to the instances of games under its control.  You can also create a
new rock-paper-scissors instance, but it will do nothing but report
for duty if you send it a command.  Still, this is a major step to
actually supporting real games.

The design of this went back and forth a bit, and I had a complicated
Session object that sat in between instantiations, but... the whole
point of objects is that they ARE instantiations, so if we make a
RPS() object it should be an instance of the game.  Silly Phil,
overcomplicating things.
Add giles/games/__init__.py to the repo.

Had it locally, forgot to add it.
Use the proper variable for checking sessions.

This is a holdover from the over-complicated previous implementation.
Break out channel existence into function.

Games will use channels as well for their messages (because duping
code is silly), so this gives the game code an avenue to check.
Work on the game_master: logging and channels.

Games will use channels for their broadcasts, so we need to make sure
those channels exist when we create a new session.  In addition, if you
successfully create a session it'd sure be nice if you got to see it.
Send the entire command string to sessions.

Instead of taking the first command string and adding spaces between
the characters.  Oh, the difference between [1] and [1:].
Further work on rps.

Still not complete, but you can actually add players now.
Decrease the cleanup tick interval.

For the time being, this is an okay solution to when a player disconnects
after playing a game.  Otherwise their connection hangs because their
player object is still lying around.  We're still not handling players
disconnecting mid-game, but...
Fix some game_master bugs.

One is just irritating (it printed %s instead of the name of the
channel when it already existed), but the other would crash the
server.
Complete RPS implementation!

That's right, Giles is /actually/ a game server now.  Amazing.
New feature: scoped new games.

New games can be global, local, or private.  If private, only the
person creating them is informed of their existence.  If local, it
is sent to their space; if global, it's sent over the global
channel.
Oops.  Fix win display in RPS.

Helps if you actually concatenate the strings...
Support repeated games in the same channel.

After some discussion with DG and pineapple, I came to the conclusion
that allowing repeat games in a channel is okay.  The stipulation is
that the channel was itself initially created by a game; presumably
if you're in there chatting about a game, you're fine with playing
another one.  People can't gamebomb other folks' channels, and global
will never have RPS playing on it.

I also fixed a bug where channels created by games were persistent
even after the game ended, which is a bad thing, as you'd never be
able to create a new game with that name because of it.
Make 'who' show everyone in your space, then not.

Basically so you can see everyone online.
Minor whitespace tweak.

Lists apparently start with three spaces because that's what I did.
New server function: get_player() (and use of it).

I'm working on a generic game class, and several times the ability
to dig out a particular user by name would come in handy.  So I
added that functionality to the server (very simple), and converted
the one already-existing place that could use it, the tell function.