/[cvs]/eggdrop1.9/src/tclhash.h
ViewVC logotype

Contents of /eggdrop1.9/src/tclhash.h

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.28 - (show annotations) (download) (as text)
Sun May 5 15:21:30 2002 UTC (17 years, 5 months ago) by wingman
Branch: MAIN
Changes since 1.27: +3 -1 lines
File MIME type: text/x-csrc
i knew i forgot something :-P

1 /*
2 * tclhash.h
3 *
4 * $Id: tclhash.h,v 1.27 2002/02/07 22:19:05 wcc Exp $
5 */
6 /*
7 * Copyright (C) 1997 Robey Pointer
8 * Copyright (C) 1999, 2000, 2001, 2002 Eggheads Development Team
9 *
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License
12 * as published by the Free Software Foundation; either version 2
13 * of the License, or (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23 */
24
25 #ifndef _EGG_TCLHASH_H
26 #define _EGG_TCLHASH_H
27
28 #include "flags.h" /* flag_record */
29
30 /* Flags for bind entries */
31 /* Does the callback want their client_data inserted as the first argument? */
32 #define BIND_WANTS_CD 1
33
34 /* Flags for bind tables */
35 #define BIND_STRICT_ATTR 0x80
36 #define BIND_BREAKABLE 0x100
37
38 /* Flags for return values from bind callbacks */
39 #define BIND_RET_LOG 1
40 #define BIND_RET_BREAK 2
41
42 /* This holds the final information for a function listening on a bind
43 table. */
44 typedef struct bind_entry_b {
45 struct bind_entry_b *next;
46 struct flag_record user_flags;
47 char *function_name;
48 Function callback;
49 void *client_data;
50 int hits;
51 int bind_flags;
52 } bind_entry_t;
53
54 /* This is the list of bind masks in a given table.
55 For instance, in the "msg" table you might have "pass", "op",
56 and "invite". */
57 typedef struct bind_chain_b {
58 struct bind_chain_b *next;
59 bind_entry_t *entries;
60 char *mask;
61 int flags;
62 } bind_chain_t;
63
64 /* This is the highest-level structure. It's like the "msg" table
65 or the "pubm" table. */
66 typedef struct bind_table_b {
67 struct bind_table_b *next;
68 bind_chain_t *chains;
69 char *name;
70 char *syntax;
71 int nargs;
72 int match_type;
73 int flags;
74 } bind_table_t;
75
76 #ifndef MAKING_MODS
77
78 void kill_bind2(void);
79
80 void check_tcl_dcc(const char *, int, const char *);
81 void check_tcl_chjn(const char *, const char *, int, char, int, const char *);
82 void check_tcl_chpt(const char *, const char *, int, int);
83 void check_tcl_bot(const char *, const char *, const char *);
84 void check_tcl_link(const char *, const char *);
85 void check_tcl_disc(const char *);
86 const char *check_tcl_filt(int, const char *);
87 int check_tcl_note(const char *, const char *, const char *);
88 void check_tcl_listen(const char *, int);
89 void check_tcl_time(struct tm *);
90 void check_tcl_nkch(const char *, const char *);
91 void check_tcl_away(const char *, int, const char *);
92 void check_tcl_event(const char *);
93 int check_tcl_chat(const char *, int, const char *);
94 void check_tcl_act(const char *, int, const char *);
95 void check_tcl_bcst(const char *, int, const char *);
96 void check_tcl_chon(char *, int);
97 void check_tcl_chof(char *, int);
98
99 int check_bind(bind_table_t *table, const char *match, struct flag_record *_flags, ...);
100
101 bind_table_t *add_bind_table2(const char *name, int nargs, const char *syntax, int match_type, int flags);
102
103 void del_bind_table2(bind_table_t *table);
104
105 bind_table_t *find_bind_table2(const char *name);
106
107 int add_bind_entry(bind_table_t *table, const char *flags, const char *mask, const char *function_name, int bind_flags, Function callback, void *client_data);
108
109 int del_bind_entry(bind_table_t *table, const char *flags, const char *mask, const char *function_name, void *cdata);
110
111 void add_builtins2(bind_table_t *table, cmd_t *cmds);
112
113 void rem_builtins2(bind_table_t *table, cmd_t *cmds);
114
115 #endif
116
117 #endif /* _EGG_TCLHASH_H */

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23