X-Git-Url: https://git.cworth.org/git?p=loudgame;a=blobdiff_plain;f=loudgame.h;h=08f4b499b48956046f59af632b92c727da9b4838;hp=11e74df5fde3456b23858b21229797de8aa2f94b;hb=76ee71f47307291d8d2457204fc7c44b93729bb9;hpb=0df3d3dd2384f2606ad5e037c925cb88a5f30fef diff --git a/loudgame.h b/loudgame.h index 11e74df..08f4b49 100644 --- a/loudgame.h +++ b/loudgame.h @@ -34,13 +34,20 @@ struct _loudgame { gchar *name; gchar *passwd; LmConnection *connection; + GMainLoop *main_loop; + GHashTable *players; + int return_value; /* Callbacks */ 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); @@ -64,6 +71,20 @@ loudgame_vsendf (loudgame_t *lg, const char *format, va_list va); +void +loudgame_broadcast (loudgame_t *lg, + const char *message); + +void +loudgame_vbroadcastf (loudgame_t *lg, + const char *format, + va_list va); + +void +loudgame_broadcastf (loudgame_t *lg, + const char *format, + ...); + void loudgame_quit (loudgame_t *lg, int return_value);