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

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

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


Revision 1.5 - (hide annotations) (download) (as text)
Sat Jan 8 21:23:14 2000 UTC (19 years, 11 months ago) by per
Branch: MAIN
CVS Tags: eggdrop104030RC2, eggdrop10403RC1, eggdrop10402RC1, eggdrop10404, eggdrop10403, eggdrop10402, HEAD
Changes since 1.4: +2 -2 lines
File MIME type: text/x-csrc
copyright

1 guppy 1.3 /*
2     * tclhash.h
3     *
4 per 1.5 * $Id: tclhash.h,v 1.4 1999/12/22 20:30:03 guppy Exp $
5 guppy 1.3 */
6     /*
7     * Copyright (C) 1997 Robey Pointer
8 per 1.5 * Copyright (C) 1999, 2000 Eggheads
9 guppy 1.3 *
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 guppy 1.4
25 guppy 1.3 #ifndef _EGG_TCLHASH_H
26     #define _EGG_TCLHASH_H
27 segfault 1.1
28     #define HT_STACKABLE 1
29    
30     typedef struct tct {
31     struct flag_record flags;
32     char *func_name;
33     struct tct *next;
34     int hits;
35     } tcl_cmd_t;
36    
37     struct tcl_bind_mask {
38     struct tcl_bind_mask *next;
39     tcl_cmd_t *first;
40     char *mask;
41     };
42    
43     typedef struct tcl_bind_list {
44     struct tcl_bind_list *next;
45     struct tcl_bind_mask *first;
46     char name[5];
47     int flags;
48     Function func;
49     } *p_tcl_bind_list;
50    
51     #ifndef MAKING_MODS
52     void init_bind();
53     void kill_bind();
54     int expmem_tclhash();
55    
56     p_tcl_bind_list add_bind_table(char *, int, Function);
57     void del_bind_table(p_tcl_bind_list);
58    
59     p_tcl_bind_list find_bind_table(char *);
60    
61     int check_tcl_bind(p_tcl_bind_list, char *, struct flag_record *, char *, int);
62     int check_tcl_dcc(char *, int, char *);
63     void check_tcl_chjn(char *, char *, int, char, int, char *);
64     void check_tcl_chpt(char *, char *, int, int);
65     void check_tcl_bot(char *, char *, char *);
66     void check_tcl_link(char *, char *);
67     void check_tcl_disc(char *);
68     char *check_tcl_filt(int, char *);
69     int check_tcl_note(char *, char *, char *);
70     void check_tcl_listen(char *, int);
71     void check_tcl_time(struct tm *);
72     void tell_binds(int, char *);
73     void check_tcl_nkch(char *, char *);
74     void check_tcl_away(char *, int, char *);
75     void check_tcl_chatactbcst(char *, int, char *, p_tcl_bind_list);
76     void check_tcl_event(char *);
77    
78     #define check_tcl_chat(a,b,c) check_tcl_chatactbcst(a,b,c,H_chat)
79     #define check_tcl_act(a,b,c) check_tcl_chatactbcst(a,b,c,H_act)
80     #define check_tcl_bcst(a,b,c) check_tcl_chatactbcst(a,b,c,H_bcst)
81     void check_tcl_chonof(char *, int, p_tcl_bind_list);
82    
83     #define check_tcl_chon(a,b) check_tcl_chonof(a,b,H_chon)
84     #define check_tcl_chof(a,b) check_tcl_chonof(a,b,H_chof)
85     void check_tcl_loadunld(char *, p_tcl_bind_list);
86    
87     #define check_tcl_load(a) check_tcl_loadunld(a,H_load)
88     #define check_tcl_unld(a) check_tcl_loadunld(a,H_unld)
89    
90 guppy 1.2 void rem_builtins(p_tcl_bind_list, cmd_t *);
91     void add_builtins(p_tcl_bind_list, cmd_t *);
92 segfault 1.1
93     int check_validity(char *, Function);
94     extern p_tcl_bind_list H_chat, H_act, H_bcst, H_chon, H_chof;
95     extern p_tcl_bind_list H_load, H_unld, H_dcc, H_bot, H_link;
96     extern p_tcl_bind_list H_away, H_nkch, H_filt, H_disc, H_event;
97    
98     #endif
99    
100     #define CHECKVALIDITY(a) if (!check_validity(argv[0],a)) { \
101     Tcl_AppendResult(irp, "bad builtin command call!", NULL); \
102     return TCL_ERROR; \
103     }
104 guppy 1.3
105     #endif /* _EGG_TCLHASH_H */

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23