]> git.cworth.org Git - loudgame/blob - lg-echo.c
Fix typo in set help message, (cards are labelled from 0 to 11 not 0 to 12)
[loudgame] / lg-echo.c
1 /*
2  * Copyright (C) 2008 Carl Worth
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program.  If not, see http://www.gnu.org/licenses/ .
16  *
17  * Author: Carl Worth <cworth@cworth.org>
18  */
19
20 #include "loudgame.h"
21
22 #include <string.h>
23 #include <stdlib.h>
24
25 static void
26 echo_handle_message (loudgame_t *lg,
27                      const char *peer,
28                      const char *message)
29 {
30     loudgame_send (lg, peer, message);
31 }
32
33 int
34 main (int argc, char **argv)
35 {
36     loudgame_t lg;
37     int err;
38
39     err = loudgame_init (&lg, argc, argv);
40     if (err)
41         return err;
42
43     lg.handle_message = echo_handle_message;
44
45     err = loudgame_run (&lg);
46     if (err)
47         return err;
48
49     return 0;
50 }