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

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

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


Revision 1.17 - (show annotations) (download) (as text)
Thu Jan 6 19:46:54 2000 UTC (19 years, 5 months ago) by fabian
Branch: MAIN
Changes since 1.16: +2 -1 lines
File MIME type: text/x-csrc
userfile_perm patch

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: proto.h,v 1.16 2000/01/01 19:42:29 fabian Exp $
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
31 #ifndef _EGG_PROTO_H
32 #define _EGG_PROTO_H
33
34 #include "../lush.h"
35
36 #ifdef HAVE_DPRINTF
37 #define dprintf dprintf_eggdrop
38 #endif
39
40 #ifndef HAVE_BZERO
41 void bzero(char *, int);
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 void dupwait_notify(char *);
132
133 /* dccutil.c */
134 void dprintf EGG_VARARGS(int, arg1);
135 void chatout EGG_VARARGS(char *, arg1);
136 extern void (*shareout) ();
137 extern void (*sharein) (int, char *);
138 void chanout_but EGG_VARARGS(int, arg1);
139 void dcc_chatter(int);
140 void lostdcc(int);
141 void removedcc(int);
142 void makepass(char *);
143 void tell_dcc(int);
144 void not_away(int);
145 void set_away(int, char *);
146 void *_get_data_ptr(int, char *, int);
147 void dcc_remove_lost(void);
148
149 #define get_data_ptr(x) _get_data_ptr(x,__FILE__,__LINE__)
150 void flush_lines(int, struct chat_info *);
151 struct dcc_t *find_idx(int);
152 int new_dcc(struct dcc_table *, int);
153 void del_dcc(int);
154 char *add_cr(char *);
155 void changeover_dcc(int, struct dcc_table *, int);
156
157 /* dns.c */
158 extern void (*dns_hostbyip) (IP);
159 extern void (*dns_ipbyhost) (char *);
160 void block_dns_hostbyip(IP);
161 void block_dns_ipbyhost(char *);
162 void call_hostbyip(IP, char *, int);
163 void call_ipbyhost(char *, IP, int);
164 void dcc_dnshostbyip(IP);
165 void dcc_dnsipbyhost(char *);
166
167 /* gotdcc.c */
168 void gotdcc(char *, char *, struct userrec *, char *);
169 void do_boot(int, char *, char *);
170 int detect_dcc_flood(time_t *, struct chat_info *, int);
171
172 /* language.c */
173 char *get_language(int);
174 int cmd_loadlanguage(struct userrec *, int, char *);
175 void add_lang_section(char *);
176 int del_lang_section(char *);
177
178 /* main.c */
179 void fatal(char *, int);
180 int expected_memory();
181 void patch(char *);
182 void eggContext(char *, int, char *);
183 void eggContextNote(char *, int, char *, char *);
184 void eggAssert(char *, int, char *, int);
185 void backup_userfile();
186
187 /* match.c */
188 int _wild_match(register unsigned char *, register unsigned char *);
189 #define wild_match(a,b) _wild_match((unsigned char *)(a),(unsigned char *)(b))
190
191 /* mem.c */
192 void *n_malloc(int, char *, int);
193 void *n_realloc(void *, int, char *, int);
194 void n_free(void *, char *, int);
195 void tell_mem_status(char *);
196 void tell_mem_status_dcc(int);
197 void debug_mem_to_dcc(int);
198
199 /* misc.c */
200 int my_strcpy(char *, char *);
201 void putlog EGG_VARARGS(int, arg1);
202 void flushlogs();
203 void check_logsize();
204 void maskhost(char *, char *);
205 char *stristr(char *, char *);
206 void splitc(char *, char *, char);
207 char *newsplit(char **);
208 char *splitnick(char **);
209 void stridx(char *, char *, int);
210 void dumplots(int, char *, char *);
211 void daysago(time_t, time_t, char *);
212 void days(time_t, time_t, char *);
213 void daysdur(time_t, time_t, char *);
214 void help_subst(char *, char *, struct flag_record *, int, char *);
215 void sub_lang(int, char *);
216 void show_motd(int);
217 void tellhelp(int, char *, struct flag_record *, int);
218 void tellwildhelp(int, char *, struct flag_record *);
219 void tellallhelp(int, char *, struct flag_record *);
220 void showhelp(char *, char *, struct flag_record *, int);
221 int copyfile(char *, char *);
222 int movefile(char *, char *);
223 void rem_help_reference(char *file);
224 void add_help_reference(char *file);
225 void debug_help(int);
226 void reload_help_data(void);
227 void remove_gunk(char *);
228 char *extracthostname(char *);
229 void show_banner(int i);
230 void make_rand_str(char *, int);
231 int oatoi(const char *);
232
233 /* net.c */
234 void my_memcpy(char *, char *, int);
235 IP my_atoul(char *);
236 unsigned long iptolong(IP);
237 IP getmyip();
238 void neterror(char *);
239 void setsock(int, int);
240 int allocsock(int, int);
241 int getsock(int);
242 char *hostnamefromip(unsigned long);
243 void killsock(int);
244 int answer(int, char *, unsigned long *, unsigned short *, int);
245 int open_listen(int *);
246 int open_telnet(char *, int);
247 int open_telnet_dcc(int, char *, char *);
248 int open_telnet_raw(int, char *, int);
249 void tputs(int, char *, unsigned int);
250 void dequeue_sockets();
251 int sockgets(char *, int *);
252 void tell_netdebug(int);
253 int sanitycheck_dcc(char *, char *, char *, char *);
254 int hostsanitycheck_dcc(char *, char *, IP, char *, char *);
255 char *iptostr(IP);
256
257 /* tcl.c */
258 void protect_tcl();
259 void unprotect_tcl();
260 void do_tcl(char *, char *);
261 int readtclprog(char *);
262 int findidx(int);
263 int findanyidx(int);
264
265 /* userent.c */
266 void list_type_kill(struct list_type *);
267 int list_type_expmem(struct list_type *);
268 int xtra_set();
269
270 /* userrec.c */
271 struct userrec *adduser(struct userrec *, char *, char *, char *, int);
272 void addhost_by_handle(char *, char *);
273 void clear_masks(struct maskrec *);
274 void clear_userlist(struct userrec *);
275 int u_pass_match(struct userrec *, char *);
276 int delhost_by_handle(char *, char *);
277 int ishost_for_handle(char *, char *);
278 int count_users(struct userrec *);
279 int deluser(char *);
280 void freeuser(struct userrec *);
281 int change_handle(struct userrec *, char *);
282 void correct_handle(char *);
283 int write_user(struct userrec *u, FILE * f, int shr);
284 void write_userfile(int);
285 struct userrec *check_dcclist_hand(char *);
286 void touch_laston(struct userrec *, char *, time_t);
287 void user_del_chan(char *);
288
289 /* users.c */
290 void addignore(char *, char *, char *, time_t);
291 int delignore(char *);
292 void tell_ignores(int, char *);
293 int match_ignore(char *);
294 void check_expired_ignores();
295 void autolink_cycle(char *);
296 void tell_file_stats(int, char *);
297 void tell_user_ident(int, char *, int);
298 void tell_users_match(int, char *, int, int, int, char *);
299 int readuserfile(char *, struct userrec **);
300
301 /* rfc1459.c */
302 int _rfc_casecmp(const char *, const char *);
303 int _rfc_ncasecmp(const char *, const char *, int);
304 int _rfc_toupper(int);
305 int _rfc_tolower(int);
306
307 #endif /* _EGG_PROTO_H */

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23