/[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.53 - (show annotations) (download) (as text)
Thu Oct 11 18:24:01 2001 UTC (17 years, 8 months ago) by tothwolf
Branch: MAIN
Changes since 1.52: +6 -15 lines
File MIME type: text/x-csrc
* rfc1459.c cleaned up and renamed to irccmp.c
* rfc_casecmp() renamed to irccmp()
* rfc_ncasecmp() renamed to ircncmp()
* rfc_toupper() renamed to irctoupper()
* rfc_tolower() renamed to irctolower()
* more match.c cleanups

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.52 2001/10/10 10:44:04 tothwolf 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 #include "irccmp.h"
38 #include "match.h"
39
40 #ifdef HAVE_DPRINTF
41 #define dprintf dprintf_eggdrop
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 (*match_noterej) (struct userrec *, char *);
57 extern int (*irccmp)(const char *, const char *);
58 extern int (*ircncmp)(const char *, const char *, int);
59 #endif
60
61 /* botcmd.c */
62 void bot_share(int, char *);
63 int base64_to_int(char *);
64
65 /* botnet.c */
66 void answer_local_whom(int, int);
67 char *lastbot(char *);
68 int nextbot(char *);
69 int in_chain(char *);
70 void tell_bots(int);
71 void tell_bottree(int, int);
72 int botlink(char *, int, char *);
73 int botunlink(int, char *, char *);
74 void dump_links(int);
75 void addbot(char *, char *, char *, char, int);
76 void updatebot(int, char *, char, int);
77 void rembot(char *);
78 struct tand_t_struct *findbot(char *);
79 void unvia(int, struct tand_t_struct *);
80 void check_botnet_pings();
81 int partysock(char *, char *);
82 int addparty(char *, char *, int, char, int, char *, int *);
83 void remparty(char *, int);
84 void partystat(char *, int, int, int);
85 int partynick(char *, int, char *);
86 int partyidle(char *, char *);
87 void partysetidle(char *, int, int);
88 void partyaway(char *, int, char *);
89 void zapfbot(int);
90 void tandem_relay(int, char *, int);
91 int getparty(char *, int);
92
93 /* botmsg.c */
94 int add_note(char *, char *, char *, int, int);
95 int simple_sprintf EGG_VARARGS(char *, arg1);
96 void tandout_but EGG_VARARGS(int, arg1);
97 char *int_to_base10(int);
98 char *unsigned_int_to_base10(unsigned int);
99 char *int_to_base64(unsigned int);
100
101 /* chanprog.c */
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 dcc_remove_lost(void);
144
145 void flush_lines(int, struct chat_info *);
146 struct dcc_t *find_idx(int);
147 int new_dcc(struct dcc_table *, int);
148 void del_dcc(int);
149 char *add_cr(char *);
150 void changeover_dcc(int, struct dcc_table *, int);
151
152 /* dns.c */
153 void dns_hostbyip(char *);
154 void dns_ipbyhost(char *);
155 void call_hostbyip(char *, char *, int);
156 void call_ipbyhost(char *, char *, int);
157 void dcc_dnshostbyip(char *);
158 void dcc_dnsipbyhost(char *);
159
160 /* gotdcc.c */
161 void gotdcc(char *, char *, struct userrec *, char *);
162 void do_boot(int, char *, char *);
163 int detect_dcc_flood(time_t *, struct chat_info *, int);
164
165 /* main.c */
166 void fatal(const char *, int);
167 void patch(const char *);
168 void eggContext(const char *, int, const char *);
169 void eggContextNote(const char *, int, const char *, const char *);
170 void eggAssert(const char *, int, const char *);
171 void backup_userfile(void);
172
173 /* misc.c */
174 int egg_strcatn(char *dst, const char *src, size_t max);
175 int my_strcpy(char *, char *);
176 void putlog EGG_VARARGS(int, arg1);
177 void flushlogs();
178 void check_logsize();
179 void maskhost(const char *, char *);
180 char *stristr(char *, char *);
181 void splitc(char *, char *, char);
182 void splitcn(char *, char *, char, size_t);
183 char *newsplit(char **);
184 char *splitnick(char **);
185 void stridx(char *, char *, int);
186 void dumplots(int, const char *, char *);
187 void daysago(time_t, time_t, char *);
188 void days(time_t, time_t, char *);
189 void daysdur(time_t, time_t, char *);
190 void help_subst(char *, char *, struct flag_record *, int, char *);
191 void sub_lang(int, char *);
192 void show_motd(int);
193 void tellhelp(int, char *, struct flag_record *, int);
194 void tellwildhelp(int, char *, struct flag_record *);
195 void tellallhelp(int, char *, struct flag_record *);
196 void showhelp(char *, char *, struct flag_record *, int);
197 void rem_help_reference(char *file);
198 void add_help_reference(char *file);
199 void debug_help(int);
200 void reload_help_data(void);
201 char *extracthostname(char *);
202 void show_telnet_banner(int i);
203 void make_rand_str(char *, int);
204 int oatoi(const char *);
205 int is_file(const char *);
206 void logsuffix_change(char *);
207 char *str_escape(const char *str, const char div, const char mask);
208 char *strchr_unescape(char *str, const char div, register const char esc_char);
209 void str_unescape(char *str, register const char esc_char);
210 #if (TCL_MAJOR_VERSION >= 8 && TCL_MINOR_VERSION >= 1) || (TCL_MAJOR_VERSION >= 9)
211 void str_nutf8tounicode(char *str, int len);
212 #endif
213 void kill_bot(char *, char *);
214
215 /* net.c */
216 IP my_atoul(char *);
217 unsigned long iptolong(IP);
218 IP getmyip();
219 struct in6_addr getmyip6();
220 void neterror(char *);
221 void setsock(int, int);
222 int allocsock(int, int);
223 int getsock(int);
224 void killsock(int);
225 int answer(int, char *, char *, unsigned short *, int);
226 inline int open_listen(int *, int);
227 int open_address_listen(char *, int *);
228 int open_telnet(char *, int);
229 int open_telnet_dcc(int, char *, char *);
230 int open_telnet_raw(int, char *, int);
231 void tputs(int, char *, unsigned int);
232 void dequeue_sockets();
233 int sockgets(char *, int *);
234 void tell_netdebug(int);
235 char *iptostr(IP);
236 char *getlocaladdr(int);
237 int sock_has_data(int, int);
238 int sockoptions(int sock, int operation, int sock_options);
239 int flush_inbuf(int idx);
240
241 /* tcl.c */
242 void protect_tcl();
243 void unprotect_tcl();
244 void do_tcl(char *, char *);
245 int readtclprog(char *fname);
246 int findidx(int);
247 int findanyidx(int);
248
249 /* userent.c */
250 void list_type_kill(struct list_type *);
251 int xtra_set();
252
253 /* userrec.c */
254 struct userrec *adduser(struct userrec *, char *, char *, char *, int);
255 void addhost_by_handle(char *, char *);
256 void clear_masks(struct maskrec *);
257 void clear_userlist(struct userrec *);
258 int u_pass_match(struct userrec *, char *);
259 int delhost_by_handle(char *, char *);
260 int ishost_for_handle(char *, char *);
261 int count_users(struct userrec *);
262 int deluser(char *);
263 void freeuser(struct userrec *);
264 int change_handle(struct userrec *, char *);
265 void correct_handle(char *);
266 int write_user(struct userrec *u, FILE * f, int shr);
267 void write_userfile(int);
268 struct userrec *check_dcclist_hand(char *);
269 void touch_laston(struct userrec *, char *, time_t);
270 void user_del_chan(char *);
271
272 /* users.c */
273 void addignore(char *, char *, char *, time_t);
274 int delignore(char *);
275 void tell_ignores(int, char *);
276 int match_ignore(char *);
277 void check_expired_ignores();
278 void autolink_cycle(char *);
279 void tell_file_stats(int, char *);
280 void tell_user_ident(int, char *, int);
281 void tell_users_match(int, char *, int, int, int, char *);
282 int readuserfile(char *, struct userrec **);
283
284 #endif /* _EGG_PROTO_H */

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23