File: ucommand.h

package info (click to toggle)
ratbox-services 1.2.4%2Brepack-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 11,760 kB
  • ctags: 6,989
  • sloc: ansic: 76,435; sh: 17,527; cpp: 3,029; perl: 1,048; makefile: 740; pascal: 607; yacc: 256; lex: 232
file content (34 lines) | stat: -rw-r--r-- 922 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/* $Id: ucommand.h 23439 2007-01-13 14:58:17Z leeh $ */
#ifndef INCLUDED_ucommand_h
#define INCLUDED_ucommand_h

#define MAX_UCOMMAND_HASH 100

struct lconn;
struct cachefile;
struct client;

extern dlink_list ucommand_list;

struct ucommand_handler
{
	const char *cmd;
	int (*func)(struct client *, struct lconn *, const char **, int);
	unsigned int flags;	/* normal oper flags required */
	unsigned int sflags;	/* services flags required */
	int minpara;
        struct cachefile **helpfile;
};

extern void init_ucommand(void);
extern void handle_ucommand(struct lconn *, const char *command, 
				const char *parv[], int parc);
extern void add_ucommand_handler(struct client *, struct ucommand_handler *);
extern void add_ucommands(struct client *, struct ucommand_handler *);

extern struct ucommand_handler *find_ucommand(const char *command);

void load_ucommand_help(void);
void clear_ucommand_help(void);

#endif