/* $Cambridge: hermes/src/prayer/cmd/cmd_help.c,v 1.2 2008/05/19 15:55:54 dpc22 Exp $ */
/************************************************
 *    Prayer - a Webmail Interface              *
 ************************************************/

/* Copyright (c) University of Cambridge 2000 - 2008 */
/* See the file NOTICE for conditions of use and distribution. */

#include "prayer_session.h"

void cmd_help(struct session *session)
{
    struct request *request = session->request;

    if (request->argc < 2) {
        session_redirect(session, request, "error");
        return;
    }
    if (request->argc == 3)
        session->help_toolbar = (session->help_toolbar) ? NIL : T;
    else
        session->help_enabled = (session->help_enabled) ? NIL : T;

    session_redirect(session, request, request->argv[1]);
}
