/[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.5 - (show annotations) (download) (as text)
Sun Jan 30 19:26:21 2000 UTC (19 years, 8 months ago) by fabian
Branch: MAIN
CVS Tags: eggdrop105020, eggdrop10503, eggdrop10403
Changes since 1.4: +10 -5 lines
File MIME type: text/x-csrc
cleanup3 patch

1 /*
2 * tclhash.h
3 *
4 * $Id: tclhash.h,v 1.4 2000/01/17 22:36:07 fabian Exp $
5 */
6 /*
7 * Copyright (C) 1997 Robey Pointer
8 * Copyright (C) 1999, 2000 Eggheads
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 #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
52 #ifndef MAKING_MODS
53
54 void init_bind();
55 void kill_bind();
56 int expmem_tclhash();
57
58 p_tcl_bind_list add_bind_table(char *, int, Function);
59 void del_bind_table(p_tcl_bind_list);
60
61 p_tcl_bind_list find_bind_table(char *);
62
63 int check_tcl_bind(p_tcl_bind_list, char *, struct flag_record *, char *, int);
64 int check_tcl_dcc(char *, int, char *);
65 void check_tcl_chjn(char *, char *, int, char, int, char *);
66 void check_tcl_chpt(char *, char *, int, int);
67 void check_tcl_bot(char *, char *, char *);
68 void check_tcl_link(char *, char *);
69 void check_tcl_disc(char *);
70 char *check_tcl_filt(int, char *);
71 int check_tcl_note(char *, char *, char *);
72 void check_tcl_listen(char *, int);
73 void check_tcl_time(struct tm *);
74 void tell_binds(int, char *);
75 void check_tcl_nkch(char *, char *);
76 void check_tcl_away(char *, int, char *);
77 void check_tcl_chatactbcst(char *, int, char *, p_tcl_bind_list);
78 void check_tcl_event(char *);
79
80 #define check_tcl_chat(a,b,c) check_tcl_chatactbcst(a,b,c,H_chat)
81 #define check_tcl_act(a,b,c) check_tcl_chatactbcst(a,b,c,H_act)
82 #define check_tcl_bcst(a,b,c) check_tcl_chatactbcst(a,b,c,H_bcst)
83 void check_tcl_chonof(char *, int, p_tcl_bind_list);
84
85 #define check_tcl_chon(a,b) check_tcl_chonof(a,b,H_chon)
86 #define check_tcl_chof(a,b) check_tcl_chonof(a,b,H_chof)
87 void check_tcl_loadunld(char *, p_tcl_bind_list);
88
89 #define check_tcl_load(a) check_tcl_loadunld(a,H_load)
90 #define check_tcl_unld(a) check_tcl_loadunld(a,H_unld)
91
92 void rem_builtins(p_tcl_bind_list, cmd_t *);
93 void add_builtins(p_tcl_bind_list, cmd_t *);
94
95 int check_validity(char *, Function);
96 extern p_tcl_bind_list H_chat, H_act, H_bcst, H_chon, H_chof;
97 extern p_tcl_bind_list H_load, H_unld, H_dcc, H_bot, H_link;
98 extern p_tcl_bind_list H_away, H_nkch, H_filt, H_disc, H_event;
99
100 #endif
101
102
103 #define CHECKVALIDITY(a) \
104 if (!check_validity(argv[0], (a))) { \
105 Tcl_AppendResult(irp, "bad builtin command call!", \
106 NULL); \
107 return TCL_ERROR; \
108 }
109
110 #endif /* _EGG_TCLHASH_H */

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23