summaryrefslogtreecommitdiffstats
path: root/pigeonhole/src/managesieve/cmd-logout.c
blob: 9e0847dfa8571cbdf26905e2f6bf1898777b30ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* Copyright (c) 2002-2018 Pigeonhole authors, see the included COPYING file
 */

#include "lib.h"
#include "ostream.h"

#include "managesieve-common.h"
#include "managesieve-commands.h"

bool cmd_logout(struct client_command_context *cmd)
{
	struct client *client = cmd->client;

	/* no arguments */
	if (!client_read_no_args(cmd))
		return FALSE;

	client_send_line(client, "OK \"Logout completed.\"");
	client_disconnect(client, "Logged out");
	return TRUE;
}