File: scommand.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 (28 lines) | stat: -rw-r--r-- 693 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
/* $Id: scommand.h 20082 2005-01-27 17:46:55Z leeh $ */
#ifndef INCLUDED_scommand_h
#define INCLUDED_scommand_h

#define MAX_SCOMMAND_HASH 100

struct client;

typedef void (*scommand_func)(struct client *, const char *parv[], int parc);

struct scommand_handler
{
	const char *cmd;
	scommand_func func;
	int flags;
	dlink_list hooks;
};

#define FLAGS_UNKNOWN	0x0001

extern void init_scommand(void);
extern void handle_scommand(const char *, const char *, const char **, int);
extern void add_scommand_handler(struct scommand_handler *);

extern void add_scommand_hook(scommand_func func, const char *command);
extern void del_scommand_hook(scommand_func func, const char *command);

#endif