2 * IRC - Internet Relay Chat, include/s_stats.h
3 * Copyright (C) 2000 Joseph Bongaarts
5 * See file AUTHORS in IRC package for additional names of
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 1, or (at your option)
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25 #ifndef INCLUDED_s_stats_h
26 #define INCLUDED_s_stats_h
32 /* Source of /stats, stats descriptor, stats char, extra param (might be 0) */
33 typedef void (*StatFunc)(struct Client *, struct StatDesc *, int, char *);
37 char sd_c; /* stats character */
38 unsigned int sd_flags; /* flags to control the stats */
39 enum Feature sd_control; /* feature controlling stats */
40 StatFunc sd_func; /* function to dispatch to */
41 int sd_funcdata; /* extra data for the function */
42 char *sd_desc; /* descriptive text */
45 #define STAT_FLAG_OPERONLY 0x01 /* Oper-only stat */
46 #define STAT_FLAG_OPERFEAT 0x02 /* Oper-only if the feature is true */
47 #define STAT_FLAG_CASESENS 0x04 /* Flag is case-sensitive */
48 #define STAT_FLAG_VARPARAM 0x08 /* may have an extra parameter */
50 extern struct StatDesc statsinfo[];
51 extern struct StatDesc *statsmap[];
53 extern void report_stats(struct Client *sptr, char stat);
54 extern void report_configured_links(struct Client *sptr, int mask);
55 extern int hunt_stats(struct Client* cptr, struct Client* sptr, int parc, char* parv[], char stat, int MustBeOper);
57 extern void stats_init(void);
59 #endif /* INCLUDED_s_stats_h */