From 76ee71f47307291d8d2457204fc7c44b93729bb9 Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Tue, 19 Feb 2008 11:45:40 -0800 Subject: [PATCH 1/1] Document the new say and whisper commands --- lg-loa.c | 5 ++++- lg-set.c | 5 ++++- loudgame.h | 4 ++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/lg-loa.c b/lg-loa.c index 61e6351..f6a8f4c 100644 --- a/lg-loa.c +++ b/lg-loa.c @@ -524,7 +524,10 @@ loa_game_handle_help (loa_game_t *game, const char *peer) { loudgame_sendf (&game->lg, peer, "I'm a bot that allows you to play the game Lines of Action.\n" - "Here are some commands I understand:\n" + "Here are some generic commands I understand:\n" + LOUDGAME_HELP + "\n" + "And some game-specific commands:\n" "\tshow \t\tShow the current board\n" "\tmove aNbN\tMove a piece, (eg. 'move b1d3')\n" "\tpass \t\tSkip a turn (only legal if no moves are possible)\n" diff --git a/lg-set.c b/lg-set.c index a6594b2..0584eda 100644 --- a/lg-set.c +++ b/lg-set.c @@ -449,7 +449,10 @@ set_game_handle_help (set_game_t *game, { loudgame_sendf (&game->lg, peer, "I'm a bot that allows you to play the game of SET.\n" - "Here are some commands I understand:\n" + "Here are some generic commands I understand:\n" + LOUDGAME_HELP + "\n" + "And some game-specific commands:\n" "\tshow \tShow the current cards on the board\n" "\thint \tIndicate how many sets are currently possible\n" "\tshuffle \tReturn the cards to the deck, shuffle and deal\n" diff --git a/loudgame.h b/loudgame.h index c899727..08f4b49 100644 --- a/loudgame.h +++ b/loudgame.h @@ -44,6 +44,10 @@ struct _loudgame { handle_message_cb handle_message; }; +#define LOUDGAME_HELP \ +"\tsay message \t\tSay 'message' to everyone in the current game\n" \ +"\twhisper user message\tSay 'message' to 'user' only\n" + int loudgame_init (loudgame_t *lg, int argc, char **argv); -- 2.43.0