/[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.47 - (show annotations) (download) (as text)
Mon Aug 13 14:51:12 2001 UTC (18 years, 2 months ago) by guppy
Branch: MAIN
Changes since 1.46: +1 -3 lines
File MIME type: text/x-csrc
Removed dcc-sanitycheck since it was half commented out as "FIXME" -- also, in the day and age of IRC bouncers and socks5 connections, etc .. more and more people are hiding behind another machine and this setting wouldn't allow them to dcc chat into bots if turned on. As for security concerns with people being able to redirect a bot to connect elsewhere .. they cannot redirect the bot to connect to a port below 1024 -- dw had a suggestion ... if the ip being sent in the dcc is known, let them dcc chat into the bot .. I like this suggestion, what about the others?

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.46 2001/07/31 16:40:40 guppy Exp $
11 */
12 /*
13 * Copyright (C) 1997 Robey Pointer
14 * Copyright (C) 1999, 2000, 2001 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 #ifdef HAVE_DPRINTF
38 #define dprintf dprintf_eggdrop
39 #endif
40
41 struct chanset_t; /* keeps the compiler warnings down :) */
42 struct userrec;
43 struct maskrec;
44 struct igrec;
45 struct flag_record;
46 struct list_type;
47 struct tand_t_struct;
48
49 #if !defined(MAKING_MODS)
50 extern void (*encrypt_pass) (char *, char *);
51 extern char *(*encrypt_string) (char *, char *);
52 extern char *(*decrypt_string) (char *, char *);
53 extern int (*rfc_casecmp) (const char *, const char *);
54 extern int (*rfc_ncasecmp) (const char *, const char *, int);
55 extern int (*rfc_toupper) (int);
56 extern int (*rfc_tolower) (int);
57 extern int (*match_noterej) (struct userrec *, char *);
58 #endif
59
60 /* botcmd.c */
61 void bot_share(int, char *);
62 int base64_to_int(char *);
63
64 /* botnet.c */
65 void answer_local_whom(int, int);
66 char *lastbot(char *);
67 int nextbot(char *);
68 int in_chain(char *);
69 void tell_bots(int);
70 void tell_bottree(int, int);
71 int botlink(char *, int, char *);
72 int botunlink(int, char *, char *);
73 void dump_links(int);
74 void addbot(char *, char *, char *, char, int);
75 void updatebot(int, char *, char, int);
76 void rembot(char *);
77 struct tand_t_struct *findbot(char *);
78 void unvia(int, struct tand_t_struct *);
79 void check_botnet_pings();
80 int partysock(char *, char *);
81 int addparty(char *, char *, int, char, int, char *, int *);
82 void remparty(char *, int);
83 void partystat(char *, int, int, int);
84 int partynick(char *, int, char *);
85 int partyidle(char *, char *);
86 void partysetidle(char *, int, int);
87 void partyaway(char *, int, char *);
88 void zapfbot(int);
89 void tandem_relay(int, char *, int);
90 int getparty(char *, int);
91
92 /* botmsg.c */
93 int add_note(char *, char *, char *, int, int);
94 int simple_sprintf EGG_VARARGS(char *, arg1);
95 void tandout_but EGG_VARARGS(int, arg1);
96 char *int_to_base10(int);
97 char *unsigned_int_to_base10(unsigned int);
98 char *int_to_base64(unsigned int);
99
100 /* chanprog.c */
101 void tell_verbose_uptime(int);
102 void tell_verbose_status(int);
103 void tell_settings(int);
104 int logmodes(char *);
105 int isowner(char *);
106 char *masktype(int);
107 char *maskname(int);
108 void reaffirm_owners();
109 void rehash();
110 void reload();
111 void chanprog();
112 void check_timers();
113 void check_utimers();
114 void rmspace(char *s);
115 void check_timers();
116 void set_chanlist(const char *host, struct userrec *rec);
117 void clear_chanlist(void);
118 void clear_chanlist_member(const char *nick);
119
120 /* cmds.c */
121 int check_dcc_attrs(struct userrec *, int);
122 int check_dcc_chanattrs(struct userrec *, char *, int, int);
123 int stripmodes(char *);
124 char *stripmasktype(int);
125
126 /* dcc.c */
127 void failed_link(int);
128 void dupwait_notify(char *);
129
130 /* dccutil.c */
131 void dprintf EGG_VARARGS(int, arg1);
132 void chatout EGG_VARARGS(char *, arg1);
133 extern void (*shareout) ();
134 extern void (*sharein) (int, char *);
135 void chanout_but EGG_VARARGS(int, arg1);
136 void dcc_chatter(int);
137 void lostdcc(int);
138 void removedcc(int);
139 void makepass(char *);
140 void tell_dcc(int);
141 void not_away(int);
142 void set_away(int, char *);
143 void *_get_data_ptr(int, char *, int);
144 void dcc_remove_lost(void);
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 void changeover_dcc(int, struct dcc_table *, int);
153
154 /* dns.c */
155 void dns_hostbyip(char *);
156 void dns_ipbyhost(char *);
157 void call_hostbyip(char *, char *, int);
158 void call_ipbyhost(char *, char *, int);
159 void dcc_dnshostbyip(char *);
160 void dcc_dnsipbyhost(char *);
161
162 /* gotdcc.c */
163 void gotdcc(char *, char *, struct userrec *, char *);
164 void do_boot(int, char *, char *);
165 int detect_dcc_flood(time_t *, struct chat_info *, int);
166
167 /* language.c */
168 char *get_language(int);
169 int cmd_loadlanguage(struct userrec *, int, char *);
170 void add_lang_section(char *);
171 int del_lang_section(char *);
172 int exist_lang_section(char *);
173
174 /* main.c */
175 void fatal(const char *, int);
176 int expected_memory(void);
177 void patch(const char *);
178 void eggContext(const char *, int, const char *);
179 void eggContextNote(const char *, int, const char *, const char *);
180 void eggAssert(const char *, int, const char *);
181 void backup_userfile(void);
182
183 /* match.c */
184 int _wild_match(register unsigned char *, register unsigned char *);
185 #define wild_match(a,b) _wild_match((unsigned char *)(a),(unsigned char *)(b))
186
187 /* mem.c */
188 void *n_malloc(int, const char *, int);
189 void *n_realloc(void *, int, const char *, int);
190 void n_free(void *, const char *, int);
191 void tell_mem_status(char *);
192 void tell_mem_status_dcc(int);
193 void debug_mem_to_dcc(int);
194
195 /* misc.c */
196 int egg_strcatn(char *dst, const char *src, size_t max);
197 int my_strcpy(char *, char *);
198 void putlog EGG_VARARGS(int, arg1);
199 void flushlogs();
200 void check_logsize();
201 void maskhost(const char *, char *);
202 char *stristr(char *, char *);
203 void splitc(char *, char *, char);
204 void splitcn(char *, char *, char, size_t);
205 char *newsplit(char **);
206 char *splitnick(char **);
207 void stridx(char *, char *, int);
208 void dumplots(int, const char *, char *);
209 void daysago(time_t, time_t, char *);
210 void days(time_t, time_t, char *);
211 void daysdur(time_t, time_t, char *);
212 void help_subst(char *, char *, struct flag_record *, int, char *);
213 void sub_lang(int, char *);
214 void show_motd(int);
215 void tellhelp(int, char *, struct flag_record *, int);
216 void tellwildhelp(int, char *, struct flag_record *);
217 void tellallhelp(int, char *, struct flag_record *);
218 void showhelp(char *, char *, struct flag_record *, int);
219 void rem_help_reference(char *file);
220 void add_help_reference(char *file);
221 void debug_help(int);
222 void reload_help_data(void);
223 char *extracthostname(char *);
224 void show_banner(int i);
225 void make_rand_str(char *, int);
226 int oatoi(const char *);
227 int is_file(const char *);
228 void logsuffix_change(char *);
229 char *str_escape(const char *str, const char div, const char mask);
230 char *strchr_unescape(char *str, const char div, register const char esc_char);
231 void str_unescape(char *str, register const char esc_char);
232 #if (TCL_MAJOR_VERSION >= 8 && TCL_MINOR_VERSION >= 1) || (TCL_MAJOR_VERSION >= 9)
233 void str_nutf8tounicode(char *str, int len);
234 #endif
235 void kill_bot(char *, char *);
236
237 /* net.c */
238 IP my_atoul(char *);
239 unsigned long iptolong(IP);
240 IP getmyip();
241 struct in6_addr getmyip6();
242 void neterror(char *);
243 void setsock(int, int);
244 int allocsock(int, int);
245 int getsock(int);
246 char *hostnamefromip(unsigned long);
247 void killsock(int);
248 int answer(int, char *, char *, unsigned short *, int);
249 inline int open_listen(int *, int);
250 int open_address_listen(char *, int *);
251 int open_telnet(char *, int);
252 int open_telnet_dcc(int, char *, char *);
253 int open_telnet_raw(int, char *, int);
254 void tputs(int, char *, unsigned int);
255 void dequeue_sockets();
256 int sockgets(char *, int *);
257 void tell_netdebug(int);
258 char *iptostr(IP);
259 char *getlocaladdr(int);
260 int sock_has_data(int, int);
261 int sockoptions(int sock, int operation, int sock_options);
262 int flush_inbuf(int idx);
263
264 /* tcl.c */
265 void protect_tcl();
266 void unprotect_tcl();
267 void do_tcl(char *, char *);
268 int readtclprog(char *fname);
269 int findidx(int);
270 int findanyidx(int);
271
272 /* userent.c */
273 void list_type_kill(struct list_type *);
274 int list_type_expmem(struct list_type *);
275 int xtra_set();
276
277 /* userrec.c */
278 struct userrec *adduser(struct userrec *, char *, char *, char *, int);
279 void addhost_by_handle(char *, char *);
280 void clear_masks(struct maskrec *);
281 void clear_userlist(struct userrec *);
282 int u_pass_match(struct userrec *, char *);
283 int delhost_by_handle(char *, char *);
284 int ishost_for_handle(char *, char *);
285 int count_users(struct userrec *);
286 int deluser(char *);
287 void freeuser(struct userrec *);
288 int change_handle(struct userrec *, char *);
289 void correct_handle(char *);
290 int write_user(struct userrec *u, FILE * f, int shr);
291 void write_userfile(int);
292 struct userrec *check_dcclist_hand(char *);
293 void touch_laston(struct userrec *, char *, time_t);
294 void user_del_chan(char *);
295
296 /* users.c */
297 void addignore(char *, char *, char *, time_t);
298 int delignore(char *);
299 void tell_ignores(int, char *);
300 int match_ignore(char *);
301 void check_expired_ignores();
302 void autolink_cycle(char *);
303 void tell_file_stats(int, char *);
304 void tell_user_ident(int, char *, int);
305 void tell_users_match(int, char *, int, int, int, char *);
306 int readuserfile(char *, struct userrec **);
307
308 /* rfc1459.c */
309 int _rfc_casecmp(const char *, const char *);
310 int _rfc_ncasecmp(const char *, const char *, int);
311 int _rfc_toupper(int);
312 int _rfc_tolower(int);
313
314 #endif /* _EGG_PROTO_H */

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23