/* $Cambridge: hermes/src/prayer/cmd/cmd_help.c,v 1.3 2008/09/16 09:59:55 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]);
}
