X-Git-Url: https://git.cworth.org/git?p=loudgame;a=blobdiff_plain;f=loudgame.c;h=2cb9a1869f62e16160909a4fad2add98524abb7e;hp=e2f0af2d5b751968725dfdd427b2e08b93e8f059;hb=0df3d3dd2384f2606ad5e037c925cb88a5f30fef;hpb=1b9383bc1758fa4b49ab029c730b7ba434b0f7ad diff --git a/loudgame.c b/loudgame.c index e2f0af2..2cb9a18 100644 --- a/loudgame.c +++ b/loudgame.c @@ -93,6 +93,36 @@ loudgame_send (loudgame_t *lg, } } +void +loudgame_vsendf (loudgame_t *lg, + const char *peer, + const char *format, + va_list va) +{ + char *str; + + str = g_strdup_vprintf (format, va); + + loudgame_send (lg, peer, str); + + free (str); +} + +void +loudgame_sendf (loudgame_t *lg, + const char *peer, + const char *format, + ...) +{ + va_list va; + + va_start (va, format); + + loudgame_vsendf (lg, peer, format, va); + + va_end (va); +} + static void handle_command (LmConnection *connection, const char *peer,