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

Contents of /eggdrop1.4/src/proto.h

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


Revision 1.20 - (show annotations) (download) (as text)
Wed Dec 15 02:32:58 1999 UTC (19 years, 9 months ago) by guppy
Branch: MAIN
Changes since 1.19: +28 -15 lines
File MIME type: text/x-csrc
id-header patch, finally, we have id tags for each file

1 /*
2 * proto.h
3 * prototypes for every function used outside its own module
4 *
5 * (i guess i'm not very modular, cuz there are a LOT of these.)
6 * with full prototyping, some have been moved to other .h files
7 * because they use structures in those
8 * (saves including those .h files EVERY time) - Beldin
9 *
10 * $Id$
11 */
12 /*
13 * Copyright (C) 1997 Robey Pointer
14 * Copyright (C) 1999 Eggheads
15 *
16 * This program is free software; you can redistribute it and/or
17 * modify it under the terms of the GNU General Public License
18 * as published by the Free Software Foundation; either version 2
19 * of the License, or (at your option) any later version.
20 *
21 * This program is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 * GNU General Public License for more details.
25 *
26 * You should have received a copy of the GNU General Public License
27 * along with this program; if not, write to the Free Software
28 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
29 */
30 #ifndef _EGG_PROTO_H
31 #define _EGG_PROTO_H
32
33 #include "../lush.h"
34
35 #ifdef HAVE_DPRINTF
36 #define dprintf dprintf_eggdrop
37 #endif
38
39 #ifndef HAVE_BZERO
40 void bzero(char *, int);
41
42 #endif
43
44 struct chanset_t; /* keeps the compiler warnings down :) */
45 struct userrec;
46 struct maskrec;
47 struct igrec;
48 struct flag_record;
49 struct list_type;
50 struct tand_t_struct;
51
52 #if !defined(MAKING_MODS)
53 extern void (*encrypt_pass) (char *, char *);
54 extern char *(*encrypt_string) (char *, char *);
55 extern char *(*decrypt_string) (char *, char *);
56 extern int (*rfc_casecmp) (const char *, const char *);
57 extern int (*rfc_ncasecmp) (const char *, const char *, int);
58 extern int (*rfc_toupper) (int);
59 extern int (*rfc_tolower) (int);
60 extern int (*match_noterej) (struct userrec *, char *);
61
62 #endif
63
64 /* botcmd.c */
65 void bot_share(int, char *);
66 int base64_to_int(char *);
67
68 /* botnet.c */
69 void answer_local_whom(int, int);
70 char *lastbot(char *);
71 int nextbot(char *);
72 int in_chain(char *);
73 void tell_bots(int);
74 void tell_bottree(int, int);
75 int botlink(char *, int, char *);
76 int botunlink(int, char *, char *);
77 void dump_links(int);
78 void addbot(char *, char *, char *, char, int);
79 void updatebot(int, char *, char, int);
80 void rembot(char *);
81 struct tand_t_struct *findbot(char *);
82 void unvia(int, struct tand_t_struct *);
83 void check_botnet_pings();
84 int partysock(char *, char *);
85 int addparty(char *, char *, int, char, int, char *, int *);
86 void remparty(char *, int);
87 void partystat(char *, int, int, int);
88 int partynick(char *, int, char *);
89 int partyidle(char *, char *);
90 void partysetidle(char *, int, int);
91 void partyaway(char *, int, char *);
92 void zapfbot(int);
93 void tandem_relay(int, char *, int);
94 int getparty(char *, int);
95
96 /* botmsg.c */
97 int add_note(char *, char *, char *, int, int);
98 int simple_sprintf EGG_VARARGS(char *, arg1);
99 void tandout_but EGG_VARARGS(int, arg1);
100 char *int_to_base10(int);
101 char *unsigned_int_to_base10(unsigned int);
102 char *int_to_base64(unsigned int);
103
104 /* chanprog.c */
105 void tell_verbose_uptime(int);
106 void tell_verbose_status(int);
107 void tell_settings(int);
108 int logmodes(char *);
109 int isowner(char *);
110 char *masktype(int);
111 char *maskname(int);
112 void reaffirm_owners();
113 void rehash();
114 void reload();
115 void chanprog();
116 void check_timers();
117 void check_utimers();
118 void rmspace(char *);
119 void check_timers();
120 void set_chanlist(char *host, struct userrec *rec);
121 void clear_chanlist();
122
123 /* cmds.c */
124 int check_dcc_attrs(struct userrec *, int);
125 int check_dcc_chanattrs(struct userrec *, char *, int, int);
126 int stripmodes(char *);
127 char *stripmasktype(int);
128
129 /* dcc.c */
130 void failed_link(int);
131
132 /* dccutil.c */
133 void dprintf EGG_VARARGS(int, arg1);
134 void chatout EGG_VARARGS(char *, arg1);
135 extern void (*shareout) ();
136 extern void (*sharein) (int, char *);
137 void chanout_but EGG_VARARGS(int, arg1);
138 void dcc_chatter(int);
139 void lostdcc(int);
140 void makepass(char *);
141 void tell_dcc(int);
142 void not_away(int);
143 void set_away(int, char *);
144 void *_get_data_ptr(int, char *, int);
145
146 #define get_data_ptr(x) _get_data_ptr(x,__FILE__,__LINE__)
147 void flush_lines(int, struct chat_info *);
148 struct dcc_t *find_idx(int);
149 int new_dcc(struct dcc_table *, int);
150 void del_dcc(int);
151 char *add_cr(char *);
152
153 /* gotdcc.c */
154 void gotdcc(char *, char *, struct userrec *, char *);
155 void do_boot(int, char *, char *);
156 int detect_dcc_flood(time_t *, struct chat_info *, int);
157
158 /* language.c */
159 char *get_language(int);
160 int cmd_loadlanguage(struct userrec *, int, char *);
161 void add_lang_section(char *);
162 int del_lang_section(char *);
163
164 /* main.c */
165 void fatal(char *, int);
166 int expected_memory();
167 void patch(char *);
168 void eggContext(char *, int, char *);
169 void eggContextNote(char *, int, char *, char *);
170 void eggAssert(char *, int, char *, int);
171 void backup_userfile();
172
173 /* match.c */
174 int _wild_match(register unsigned char *, register unsigned char *);
175 #define wild_match(a,b) _wild_match((unsigned char *)(a),(unsigned char *)(b))
176
177 /* mem.c */
178 void *n_malloc(int, char *, int);
179 void *n_realloc(void *, int, char *, int);
180 void n_free(void *, char *, int);
181 void tell_mem_status(char *);
182 void tell_mem_status_dcc(int);
183 void debug_mem_to_dcc(int);
184
185 /* misc.c */
186 int my_strcpy(char *, char *);
187 void putlog EGG_VARARGS(int, arg1);
188 void flushlogs();
189 void check_logsize();
190 void maskhost(char *, char *);
191 char *stristr(char *, char *);
192 void splitc(char *, char *, char);
193 char *newsplit(char **);
194 char *splitnick(char **);
195 void stridx(char *, char *, int);
196 void dumplots(int, char *, char *);
197 void daysago(time_t, time_t, char *);
198 void days(time_t, time_t, char *);
199 void daysdur(time_t, time_t, char *);
200 void help_subst(char *, char *, struct flag_record *, int, char *);
201 void sub_lang(int, char *);
202 void show_motd(int);
203 void tellhelp(int, char *, struct flag_record *, int);
204 void tellwildhelp(int, char *, struct flag_record *);
205 void tellallhelp(int, char *, struct flag_record *);
206 void showhelp(char *, char *, struct flag_record *, int);
207 int copyfile(char *, char *);
208 int movefile(char *, char *);
209 void rem_help_reference(char *file);
210 void add_help_reference(char *file);
211 void debug_help(int);
212 void reload_help_data(void);
213 void remove_gunk(char *);
214 char *extracthostname(char *);
215 void show_banner(int i);
216 void make_rand_str(char *, int);
217
218 /* net.c */
219 void my_memcpy(char *, char *, int);
220 IP my_atoul(char *);
221 unsigned long iptolong(IP);
222 IP getmyip();
223 void neterror(char *);
224 void setsock(int, int);
225 int getsock(int);
226 void killsock(int);
227 int answer(int, char *, unsigned long *, unsigned short *, int);
228 int open_listen(int *);
229 int open_telnet(char *, int);
230 int open_telnet_dcc(int, char *, char *);
231 int open_telnet_raw(int, char *, int);
232 void tputs(int, char *, unsigned int);
233 void dequeue_sockets();
234 int sockgets(char *, int *);
235 void tell_netdebug(int);
236 int sanitycheck_dcc(char *, char *, char *, char *);
237
238 /* tcl.c */
239 void protect_tcl();
240 void unprotect_tcl();
241 void do_tcl(char *, char *);
242 int readtclprog(char *);
243 int findidx(int);
244 int findanyidx(int);
245
246 /* userent.c */
247 void list_type_kill(struct list_type *);
248 int list_type_expmem(struct list_type *);
249 int xtra_set();
250
251 /* userrec.c */
252 struct userrec *adduser(struct userrec *, char *, char *, char *, int);
253 void addhost_by_handle(char *, char *);
254 void clear_masks(struct maskrec *);
255 void clear_userlist(struct userrec *);
256 int u_pass_match(struct userrec *, char *);
257 int delhost_by_handle(char *, char *);
258 int ishost_for_handle(char *, char *);
259 int count_users(struct userrec *);
260 int deluser(char *);
261 void freeuser(struct userrec *);
262 int change_handle(struct userrec *, char *);
263 void correct_handle(char *);
264 int write_user(struct userrec *u, FILE * f, int shr);
265 void write_userfile(int);
266 struct userrec *check_dcclist_hand(char *);
267 void touch_laston(struct userrec *, char *, time_t);
268 void user_del_chan(char *);
269
270 /* users.c */
271 void addignore(char *, char *, char *, time_t);
272 int delignore(char *);
273 void tell_ignores(int, char *);
274 int match_ignore(char *);
275 void check_expired_ignores();
276 void autolink_cycle(char *);
277 void tell_file_stats(int, char *);
278 void tell_user_ident(int, char *, int);
279 void tell_users_match(int, char *, int, int, int, char *);
280 int readuserfile(char *, struct userrec **);
281
282 /* rfc1459.c */
283 int _rfc_casecmp(const char *, const char *);
284 int _rfc_ncasecmp(const char *, const char *, int);
285 int _rfc_toupper(int);
286 int _rfc_tolower(int);
287
288 #endif /* _EGG_PROTO_H */

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23