]> git.cworth.org Git - loudgame/blobdiff - lg-echo.c
Document the new say and whisper commands
[loudgame] / lg-echo.c
index b6a48e8bf6aa018e2788013f5a4049ee3cd212b0..c153472bb84f78ce8e1613086d0f90f0f3dcbaa9 100644 (file)
--- a/lg-echo.c
+++ b/lg-echo.c
@@ -27,21 +27,7 @@ echo_handle_message (loudgame_t *lg,
                     const char *peer,
                     const char *message)
 {
-    LmMessage *reply;
-    gboolean result;
-    GError *error = NULL;
-
-    reply = lm_message_new (peer, LM_MESSAGE_TYPE_MESSAGE);
-
-    lm_message_node_add_child (reply->node, "body", message);
-
-    result = lm_connection_send (lg->connection, reply, &error);
-    lm_message_unref (reply);
-
-    if (! result) {
-       g_error ("lm_connection_send failed: error->message");
-       loudgame_quit (lg, 1);
-    }
+    loudgame_send (lg, peer, message);
 }
 
 int