/[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.1 - (show annotations) (download) (as text)
Mon Sep 13 14:36:18 1999 UTC (20 years, 1 month ago) by segfault
Branch: MAIN
File MIME type: text/x-csrc
Initial commit based off of .29 cvs

1 #ifndef _TCL_HASH_H_
2 #define _TCL_HASH_H_
3
4 #define HT_STACKABLE 1
5
6 typedef struct tct {
7 struct flag_record flags;
8 char *func_name;
9 struct tct *next;
10 int hits;
11 } tcl_cmd_t;
12
13 struct tcl_bind_mask {
14 struct tcl_bind_mask *next;
15 tcl_cmd_t *first;
16 char *mask;
17 };
18
19 typedef struct tcl_bind_list {
20 struct tcl_bind_list *next;
21 struct tcl_bind_mask *first;
22 char name[5];
23 int flags;
24 Function func;
25 } *p_tcl_bind_list;
26
27 #ifndef MAKING_MODS
28 void init_bind();
29 void kill_bind();
30 int expmem_tclhash();
31
32 p_tcl_bind_list add_bind_table(char *, int, Function);
33 void del_bind_table(p_tcl_bind_list);
34
35 p_tcl_bind_list find_bind_table(char *);
36
37 int check_tcl_bind(p_tcl_bind_list, char *, struct flag_record *, char *, int);
38 int check_tcl_dcc(char *, int, char *);
39 void check_tcl_chjn(char *, char *, int, char, int, char *);
40 void check_tcl_chpt(char *, char *, int, int);
41 void check_tcl_bot(char *, char *, char *);
42 void check_tcl_link(char *, char *);
43 void check_tcl_disc(char *);
44 char *check_tcl_filt(int, char *);
45 int check_tcl_note(char *, char *, char *);
46 void check_tcl_listen(char *, int);
47 void check_tcl_time(struct tm *);
48 void tell_binds(int, char *);
49 void check_tcl_nkch(char *, char *);
50 void check_tcl_away(char *, int, char *);
51 void check_tcl_chatactbcst(char *, int, char *, p_tcl_bind_list);
52 void check_tcl_event(char *);
53
54 #define check_tcl_chat(a,b,c) check_tcl_chatactbcst(a,b,c,H_chat)
55 #define check_tcl_act(a,b,c) check_tcl_chatactbcst(a,b,c,H_act)
56 #define check_tcl_bcst(a,b,c) check_tcl_chatactbcst(a,b,c,H_bcst)
57 void check_tcl_chonof(char *, int, p_tcl_bind_list);
58
59 #define check_tcl_chon(a,b) check_tcl_chonof(a,b,H_chon)
60 #define check_tcl_chof(a,b) check_tcl_chonof(a,b,H_chof)
61 void check_tcl_loadunld(char *, p_tcl_bind_list);
62
63 #define check_tcl_load(a) check_tcl_loadunld(a,H_load)
64 #define check_tcl_unld(a) check_tcl_loadunld(a,H_unld)
65
66 void rem_builtins(p_tcl_bind_list, cmd_t *, int);
67 void add_builtins(p_tcl_bind_list, cmd_t *, int);
68
69 int check_validity(char *, Function);
70 extern p_tcl_bind_list H_chat, H_act, H_bcst, H_chon, H_chof;
71 extern p_tcl_bind_list H_load, H_unld, H_dcc, H_bot, H_link;
72 extern p_tcl_bind_list H_away, H_nkch, H_filt, H_disc, H_event;
73
74 #endif
75
76 #define CHECKVALIDITY(a) if (!check_validity(argv[0],a)) { \
77 Tcl_AppendResult(irp, "bad builtin command call!", NULL); \
78 return TCL_ERROR; \
79 }
80 #endif

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23