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

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

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


Revision 1.1.1.1 - (show annotations) (download) (as text) (vendor branch)
Mon Jul 26 21:11:06 2010 UTC (8 years, 11 months ago) by simple
Branch: eggheads
CVS Tags: v1
Changes since 1.1: +0 -0 lines
File MIME type: text/x-csrc
Imported Eggdrop 1.6.20

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.82 2010/07/12 15:40:52 thommey Exp $
11 */
12 /*
13 * Copyright (C) 1997 Robey Pointer
14 * Copyright (C) 1999 - 2010 Eggheads Development Team
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 #include "misc_file.h"
36
37 #define dprintf dprintf_eggdrop
38
39 struct chanset_t; /* keeps the compiler warnings down :) */
40 struct userrec;
41 struct maskrec;
42 struct igrec;
43 struct flag_record;
44 struct list_type;
45 struct tand_t_struct;
46
47 #ifndef MAKING_MODS
48 extern void (*encrypt_pass) (char *, char *);
49 extern char *(*encrypt_string) (char *, char *);
50 extern char *(*decrypt_string) (char *, char *);
51 extern int (*rfc_casecmp) (const char *, const char *);
52 extern int (*rfc_ncasecmp) (const char *, const char *, int);
53 extern int (*rfc_toupper) (int);
54 extern int (*rfc_tolower) (int);
55 extern int (*match_noterej) (struct userrec *, char *);
56 #endif
57
58 /* botcmd.c */
59 void bot_share(int, char *);
60 int base64_to_int(char *);
61
62 /* botnet.c */
63 void answer_local_whom(int, int);
64 char *lastbot(char *);
65 int nextbot(char *);
66 int in_chain(char *);
67 void tell_bots(int);
68 void tell_bottree(int, int);
69 int botlink(char *, int, char *);
70 int botunlink(int, char *, char *, char *);
71 void dump_links(int);
72 void addbot(char *, char *, char *, char, int);
73 void updatebot(int, char *, char, int);
74 void rembot(char *);
75 struct tand_t_struct *findbot(char *);
76 void unvia(int, struct tand_t_struct *);
77 void check_botnet_pings();
78 int partysock(char *, char *);
79 int addparty(char *, char *, int, char, int, char *, int *);
80 void remparty(char *, int);
81 void partystat(char *, int, int, int);
82 int partynick(char *, int, char *);
83 int partyidle(char *, char *);
84 void partysetidle(char *, int, int);
85 void partyaway(char *, int, char *);
86 void zapfbot(int);
87 void tandem_relay(int, char *, int);
88 int getparty(char *, int);
89
90 /* botmsg.c */
91 int add_note(char *, char *, char *, int, int);
92 int simple_sprintf EGG_VARARGS(char *, arg1);
93 void tandout_but EGG_VARARGS(int, arg1);
94 char *int_to_base10(int);
95 char *unsigned_int_to_base10(unsigned int);
96 char *int_to_base64(unsigned int);
97
98 /* chanprog.c */
99 void tell_verbose_uptime(int);
100 void tell_verbose_status(int);
101 void tell_settings(int);
102 int logmodes(char *);
103 int isowner(char *);
104 char *masktype(int);
105 char *maskname(int);
106 void reaffirm_owners();
107 void rehash();
108 void reload();
109 void chanprog();
110 void check_timers();
111 void check_utimers();
112 void rmspace(char *s);
113 void check_timers();
114 void set_chanlist(const char *host, struct userrec *rec);
115 void clear_chanlist(void);
116 void clear_chanlist_member(const char *nick);
117
118 /* cmds.c */
119 int check_dcc_attrs(struct userrec *, int);
120 int check_dcc_chanattrs(struct userrec *, char *, int, int);
121 int stripmodes(char *);
122 char *stripmasktype(int);
123
124 /* dcc.c */
125 void failed_link(int);
126 void strip_mirc_codes(int, char *);
127 int check_ansi(char *);
128 void dupwait_notify(char *);
129
130 /* dccutil.c */
131 int increase_socks_max();
132 int findidx(int);
133 int findanyidx(int);
134 char *add_cr(char *);
135 void dprintf EGG_VARARGS(int, arg1);
136 void chatout EGG_VARARGS(char *, arg1);
137 extern void (*shareout) ();
138 extern void (*sharein) (int, char *);
139 void chanout_but EGG_VARARGS(int, arg1);
140 void dcc_chatter(int);
141 void lostdcc(int);
142 void killtransfer(int);
143 void removedcc(int);
144 void makepass(char *);
145 void tell_dcc(int);
146 void not_away(int);
147 void set_away(int, char *);
148 void *_get_data_ptr(int, char *, int);
149 void dcc_remove_lost(void);
150 void do_boot(int, char *, char *);
151 int detect_dcc_flood(time_t *, struct chat_info *, int);
152
153 #define get_data_ptr(x) _get_data_ptr(x,__FILE__,__LINE__)
154 void flush_lines(int, struct chat_info *);
155 struct dcc_t *find_idx(int);
156 int new_dcc(struct dcc_table *, int);
157 void del_dcc(int);
158 void changeover_dcc(int, struct dcc_table *, int);
159
160 /* dns.c */
161 extern void (*dns_hostbyip) (IP);
162 extern void (*dns_ipbyhost) (char *);
163 void block_dns_hostbyip(IP);
164 void block_dns_ipbyhost(char *);
165 void call_hostbyip(IP, char *, int);
166 void call_ipbyhost(char *, IP, int);
167 void dcc_dnshostbyip(IP);
168 void dcc_dnsipbyhost(char *);
169
170 /* language.c */
171 char *get_language(int);
172 int cmd_loadlanguage(struct userrec *, int, char *);
173 void add_lang_section(char *);
174 int del_lang_section(char *);
175 int exist_lang_section(char *);
176
177 /* main.c */
178 void fatal(const char *, int);
179 int expected_memory(void);
180 void eggContext(const char *, int, const char *);
181 void eggContextNote(const char *, int, const char *, const char *);
182 void eggAssert(const char *, int, const char *);
183 void backup_userfile(void);
184 int mainloop(int);
185
186 /* match.c */
187 int casecharcmp(unsigned char, unsigned char);
188 int charcmp(unsigned char, unsigned char);
189 int _wild_match(register unsigned char *, register unsigned char *);
190 int _wild_match_per(register unsigned char *, register unsigned char *,
191 int (*)(unsigned char, unsigned char),
192 int (*)(unsigned char, unsigned char),
193 unsigned char *);
194 int addr_match(char *, char *, int, int);
195 int mask_match(char *, char *);
196 int cidr_match(char *, char *, int);
197 int cron_match(const char *, const char *);
198
199 #define wild_match(a,b) _wild_match((unsigned char *)(a),(unsigned char *)(b))
200 #define wild_match_per(a,b) _wild_match_per((unsigned char *)(a), \
201 (unsigned char *)(b),casecharcmp,NULL,NULL)
202 #define wild_match_partial_case(a,b) _wild_match_per((unsigned char *)(a), \
203 (unsigned char *)(b),casecharcmp,charcmp, \
204 (unsigned char *)strchr((b),' '))
205 #define match_addr(a,b) addr_match((char *)(a),(char *)(b),0,0)
206 #define match_useraddr(a,b) addr_match((char *)(a),(char *)(b),1,0)
207 #define cmp_masks(a,b) addr_match((char *)(a),(char *)(b),0,1)
208 #define cmp_usermasks(a,b) addr_match((char *)(a),(char *)(b),1,1)
209
210 /* mem.c */
211 void *n_malloc(int, const char *, int);
212 void *n_realloc(void *, int, const char *, int);
213 void n_free(void *, const char *, int);
214 void tell_mem_status(char *);
215 void tell_mem_status_dcc(int);
216 void debug_mem_to_dcc(int);
217
218 /* misc.c */
219 int egg_strcatn(char *, const char *, size_t);
220 int my_strcpy(char *, char *);
221 void putlog EGG_VARARGS(int, arg1);
222 void flushlogs();
223 void check_logsize();
224 void splitc(char *, char *, char);
225 void splitcn(char *, char *, char, size_t);
226 void remove_crlf(char **);
227 char *newsplit(char **);
228 char *splitnick(char **);
229 void stridx(char *, char *, int);
230 void dumplots(int, const char *, const char *);
231 void daysago(time_t, time_t, char *);
232 void days(time_t, time_t, char *);
233 void daysdur(time_t, time_t, char *);
234 void help_subst(char *, char *, struct flag_record *, int, char *);
235 void sub_lang(int, char *);
236 void show_motd(int);
237 void tellhelp(int, char *, struct flag_record *, int);
238 void tellwildhelp(int, char *, struct flag_record *);
239 void tellallhelp(int, char *, struct flag_record *);
240 void showhelp(char *, char *, struct flag_record *, int);
241 void rem_help_reference(char *);
242 void add_help_reference(char *);
243 void debug_help(int);
244 void reload_help_data(void);
245 char *extracthostname(char *);
246 void show_banner(int i);
247 void make_rand_str(char *, int);
248 int oatoi(const char *);
249 int is_file(const char *);
250 void logsuffix_change(char *);
251 char *str_escape(const char *, const char, const char);
252 char *strchr_unescape(char *, const char, register const char);
253 void str_unescape(char *, register const char);
254 int str_isdigit(const char *);
255 void kill_bot(char *, char *);
256
257 void maskaddr(const char *, char *, int);
258 #define maskhost(a,b) maskaddr((a),(b),3)
259 #define maskban(a,b) maskaddr((a),(b),3)
260
261 /* net.c */
262 IP my_atoul(char *);
263 unsigned long iptolong(IP);
264 IP getmyip();
265 void neterror(char *);
266 void setsock(int, int);
267 int allocsock(int, int);
268 int alloctclsock(int, int, Tcl_FileProc *, ClientData);
269 int getsock(int);
270 void killsock(int);
271 void killtclsock(int);
272 int answer(int, char *, unsigned long *, unsigned short *, int);
273 inline int open_listen(int *);
274 int open_address_listen(IP addr, int *);
275 int open_telnet(char *, int);
276 int open_telnet_dcc(int, char *, char *);
277 int open_telnet_raw(int, char *, int);
278 void tputs(int, char *, unsigned int);
279 void dequeue_sockets();
280 int preparefdset(fd_set *, sock_list *, int, int, int);
281 int sockread(char *, int *, sock_list *, int, int);
282 int sockgets(char *, int *);
283 void tell_netdebug(int);
284 int sanitycheck_dcc(char *, char *, char *, char *);
285 int hostsanitycheck_dcc(char *, char *, IP, char *, char *);
286 char *iptostr(IP);
287 int sock_has_data(int, int);
288 int sockoptions(int sock, int operation, int sock_options);
289 int flush_inbuf(int idx);
290
291 /* tcl.c */
292 struct threaddata *threaddata();
293 int init_threaddata(int);
294 void protect_tcl();
295 void unprotect_tcl();
296 void do_tcl(char *, char *);
297 int readtclprog(char *fname);
298
299 /* userent.c */
300 void list_type_kill(struct list_type *);
301 int list_type_expmem(struct list_type *);
302 int xtra_set();
303
304 /* userrec.c */
305 struct userrec *adduser(struct userrec *, char *, char *, char *, int);
306 void addhost_by_handle(char *, char *);
307 void clear_masks(struct maskrec *);
308 void clear_userlist(struct userrec *);
309 int u_pass_match(struct userrec *, char *);
310 int delhost_by_handle(char *, char *);
311 int ishost_for_handle(char *, char *);
312 int count_users(struct userrec *);
313 int deluser(char *);
314 void freeuser(struct userrec *);
315 int change_handle(struct userrec *, char *);
316 void correct_handle(char *);
317 int write_user(struct userrec *, FILE *, int);
318 int write_ignores(FILE *f, int);
319 void write_userfile(int);
320 struct userrec *check_dcclist_hand(char *);
321 void touch_laston(struct userrec *, char *, time_t);
322 void user_del_chan(char *);
323 char *fixfrom(char *);
324 int check_conflags(struct flag_record *fr, int md);
325
326 /* users.c */
327 void addignore(char *, char *, char *, time_t);
328 int delignore(char *);
329 void tell_ignores(int, char *);
330 int match_ignore(char *);
331 void check_expired_ignores();
332 void autolink_cycle(char *);
333 void tell_file_stats(int, char *);
334 void tell_user_ident(int, char *, int);
335 void tell_users_match(int, char *, int, int, int, char *);
336 int readuserfile(char *, struct userrec **);
337
338 /* rfc1459.c */
339 int _rfc_casecmp(const char *, const char *);
340 int _rfc_ncasecmp(const char *, const char *, int);
341 int _rfc_toupper(int);
342 int _rfc_tolower(int);
343
344 #endif /* _EGG_PROTO_H */

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23