/*
 *  m_help.c: Provides help information to a user/operator.
 *
 *  Copyright (C) 2002 by the past and present ircd coders, and others.
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
 *  USA
 *
 *  $Id: m_help.c,v 1.3 2003/06/14 13:55:51 tr-ircd Exp $
 */

#include "struct.h"
#include "common.h"
#include "sys.h"
#include "numeric.h"
#include "msg.h"
#include "channel.h"
#include "h.h"
#include "s_conf.h"

static struct Message _msgtab[] = {
    {MSG_HELP, 0, MAXPARA, M_SLOW, 0L,
     m_unregistered, u_help, u_help, m_ignore, m_ignore}
};

static struct Message h_msgtab[] = {
    {MSG_HELPME, 0, MAXPARA, M_SLOW, 0L,
     m_unregistered, u_help, u_help, m_ignore, m_ignore}
};

#ifndef STATIC_MODULES

char *_version = "$Revision: 1.3 $";

void _modinit(void)
{
    mod_add_cmd(_msgtab);
    mod_add_cmd(h_msgtab);
}

void _moddeinit(void)
{
    mod_del_cmd(_msgtab);
    mod_del_cmd(h_msgtab);
}
#else
void m_help_init(void)
{
    mod_add_cmd(_msgtab);
    mod_add_cmd(h_msgtab);
} 
#endif

/*
 * m_help - HELP message handler
 *      parv[0] = sender prefix
 */
int u_help(struct Client *client_p, struct Client *source_p, int parc, char *parv[])
{
    if (parc > 1)
	dohelp(source_p, HELPPATH, parv[1], parv[0]);
    else
	dohelp(source_p, HELPPATH, NULL, parv[0]);
    return 0;
}



syntax highlighted by Code2HTML, v. 0.9.1