X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=src%2Fargs.c;h=aee5e940531a66a4ca54753aed555a419c779b12;hb=2733782926e6d892eb37e48dbc233ca0c78dc452;hp=98aa80cb2feccd95ae3ffc1ed944fd34045ff214;hpb=cde4dcdfac0aa34436ff8741472d994041487fd2;p=grrobot diff --git a/src/args.c b/src/args.c index 98aa80c..aee5e94 100644 --- a/src/args.c +++ b/src/args.c @@ -44,6 +44,7 @@ static struct argp_option options[] = { {"port", 'p', "PORT", 0, "Port of server"}, {"user", 'u', "USERNAME", 0, "Username for conection"}, {"game", 'g', "GAME", 0, "Game to join"}, + {"watch", 'w', 0, 0, "Watch instad of join"}, { 0 } }; @@ -65,6 +66,9 @@ parse_opt (int key, char *arg, struct argp_state *state) case 'g': args->game = arg; break; + case 'w': + args->watch = 1; + break; case ARGP_KEY_ARG: argp_usage (state); @@ -101,6 +105,7 @@ args_parse(args_t *args, int argc, char *argv[]) args->game = getenv ("RR_GAME"); if (args->game == NULL) args->game = ARGS_GAME_DEFAULT; + args->watch = 0; return argp_parse (&argp, argc, argv, 0, 0, args); }