1 /*
2 * h_site_groups.c
3 *
4 * (C)2000-2011 by Marc Huber <Marc.Huber@web.de>
5 * All rights reserved.
6 *
7 * $Id: h_site_groups.c,v 1.11 2015/03/14 06:11:26 marc Exp marc $
8 *
9 */
10
11 #include "headers.h"
12
13 static const char rcsid[] __attribute__ ((used)) = "$Id: h_site_groups.c,v 1.11 2015/03/14 06:11:26 marc Exp marc $";
14
h_site_groups(struct context * ctx,char * arg)15 void h_site_groups(struct context *ctx, char *arg __attribute__ ((unused)))
16 {
17 DebugIn(DEBUG_COMMAND);
18
19 reply(ctx, MSG_214_Group_membership);
20
21 if (ctx->gids_size) {
22 int i;
23 for (i = 0; i < ctx->gids_size; i++)
24 replyf(ctx, "214- %u\r\n", (u_int) ctx->gids[i]);
25 } else
26 replyf(ctx, "214- %u\r\n", (u_int) ctx->gid);
27
28 reply(ctx, "214\r\n");
29
30 DebugOut(DEBUG_COMMAND);
31 }
32