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

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

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


Revision 1.30 - (hide annotations) (download) (as text)
Fri May 17 07:29:25 2002 UTC (17 years, 5 months ago) by stdarg
Branch: MAIN
Changes since 1.29: +9 -9 lines
File MIME type: text/x-csrc
* Bind table cleanups, especially renaming bind table functions and making
add/rem_builtins take a char * instead of a bind_table_t *.

1 guppy 1.8 /*
2 tothwolf 1.29 * tclhash.h --
3 fabian 1.3 */
4 guppy 1.8 /*
5     * Copyright (C) 1997 Robey Pointer
6 wcc 1.27 * Copyright (C) 1999, 2000, 2001, 2002 Eggheads Development Team
7 guppy 1.8 *
8 fabian 1.3 * This program is free software; you can redistribute it and/or
9     * modify it under the terms of the GNU General Public License
10     * as published by the Free Software Foundation; either version 2
11     * of the License, or (at your option) any later version.
12 guppy 1.8 *
13 fabian 1.3 * 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.
17 guppy 1.8 *
18 fabian 1.3 * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21     */
22 tothwolf 1.29 /*
23 stdarg 1.30 * $Id: tclhash.h,v 1.29 2002/05/05 16:40:39 tothwolf Exp $
24 tothwolf 1.29 */
25 fabian 1.3
26     #ifndef _EGG_TCLHASH_H
27     #define _EGG_TCLHASH_H
28 wingman 1.28
29     #include "flags.h" /* flag_record */
30 segfault 1.1
31 stdarg 1.14 /* Flags for bind entries */
32 stdarg 1.12 /* Does the callback want their client_data inserted as the first argument? */
33     #define BIND_WANTS_CD 1
34 fabian 1.7
35 stdarg 1.14 /* Flags for bind tables */
36     #define BIND_STRICT_ATTR 0x80
37 stdarg 1.15 #define BIND_BREAKABLE 0x100
38 stdarg 1.16
39     /* Flags for return values from bind callbacks */
40     #define BIND_RET_LOG 1
41     #define BIND_RET_BREAK 2
42    
43 stdarg 1.10 /* This holds the final information for a function listening on a bind
44     table. */
45 stdarg 1.9 typedef struct bind_entry_b {
46     struct bind_entry_b *next;
47     struct flag_record user_flags;
48     char *function_name;
49     Function callback;
50     void *client_data;
51     int hits;
52     int bind_flags;
53     } bind_entry_t;
54    
55 stdarg 1.10 /* This is the list of bind masks in a given table.
56     For instance, in the "msg" table you might have "pass", "op",
57     and "invite". */
58 stdarg 1.9 typedef struct bind_chain_b {
59 stdarg 1.11 struct bind_chain_b *next;
60 stdarg 1.9 bind_entry_t *entries;
61     char *mask;
62     int flags;
63     } bind_chain_t;
64    
65 stdarg 1.10 /* This is the highest-level structure. It's like the "msg" table
66     or the "pubm" table. */
67 stdarg 1.9 typedef struct bind_table_b {
68 stdarg 1.11 struct bind_table_b *next;
69 stdarg 1.9 bind_chain_t *chains;
70     char *name;
71 stdarg 1.13 char *syntax;
72 stdarg 1.14 int nargs;
73     int match_type;
74 stdarg 1.9 int flags;
75     } bind_table_t;
76 fabian 1.7
77 segfault 1.1 #ifndef MAKING_MODS
78 fabian 1.5
79 stdarg 1.30 void kill_binds(void);
80 fabian 1.7
81 stdarg 1.19 void check_tcl_dcc(const char *, int, const char *);
82 fabian 1.7 void check_tcl_chjn(const char *, const char *, int, char, int, const char *);
83     void check_tcl_chpt(const char *, const char *, int, int);
84     void check_tcl_bot(const char *, const char *, const char *);
85     void check_tcl_link(const char *, const char *);
86     void check_tcl_disc(const char *);
87     const char *check_tcl_filt(int, const char *);
88     int check_tcl_note(const char *, const char *, const char *);
89     void check_tcl_listen(const char *, int);
90 segfault 1.1 void check_tcl_time(struct tm *);
91 fabian 1.7 void check_tcl_nkch(const char *, const char *);
92     void check_tcl_away(const char *, int, const char *);
93     void check_tcl_event(const char *);
94 stdarg 1.24 int check_tcl_chat(const char *, int, const char *);
95 stdarg 1.23 void check_tcl_act(const char *, int, const char *);
96     void check_tcl_bcst(const char *, int, const char *);
97 stdarg 1.24 void check_tcl_chon(char *, int);
98     void check_tcl_chof(char *, int);
99 fabian 1.7
100 stdarg 1.14 int check_bind(bind_table_t *table, const char *match, struct flag_record *_flags, ...);
101    
102 stdarg 1.30 bind_table_t *bind_table_add(const char *name, int nargs, const char *syntax, int match_type, int flags);
103 stdarg 1.14
104 stdarg 1.30 void bind_table_del(bind_table_t *table);
105 stdarg 1.14
106 stdarg 1.30 bind_table_t *bind_table_find(const char *name);
107 stdarg 1.14
108 stdarg 1.30 int bind_entry_add(bind_table_t *table, const char *flags, const char *mask, const char *function_name, int bind_flags, Function callback, void *client_data);
109 stdarg 1.14
110 stdarg 1.30 int bind_entry_del(bind_table_t *table, const char *flags, const char *mask, const char *function_name, void *cdata);
111 stdarg 1.14
112 stdarg 1.30 void add_builtins(const char *table_name, cmd_t *cmds);
113 stdarg 1.14
114 stdarg 1.30 void rem_builtins(const char *table_name, cmd_t *cmds);
115 segfault 1.1
116 tothwolf 1.29 #endif /* !MAKING_MODS */
117 fabian 1.3
118 tothwolf 1.29 #endif /* !_EGG_TCLHASH_H */

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23