/[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.61 - (show annotations) (download) (as text)
Fri Jan 4 02:56:25 2002 UTC (17 years, 5 months ago) by ite
Branch: MAIN
Changes since 1.60: +1 -5 lines
File MIME type: text/x-csrc
* Moved some botnet utility functions from the core to libeggdrop.
* Moved some common macros to libeggdrop.
* Created lib/eggdrop/eggdrop.h and renamed src/eggdrop.h to src/egg.h to avoid ambiguities.
* Added a couple of macros to be c++ friendly

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.60 2001/12/19 06:25:08 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 #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 #ifndef 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 #endif
58
59 /* botcmd.c */
60 void bot_share(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 *);
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 void tandout_but EGG_VARARGS(int, arg1);
93 char *unsigned_int_to_base10(unsigned int);
94
95 /* chanprog.c */
96 void tell_verbose_status(int);
97 void tell_settings(int);
98 int logmodes(char *);
99 int isowner(char *);
100 char *masktype(int);
101 char *maskname(int);
102 void reaffirm_owners();
103 void rehash();
104 void reload();
105 void chanprog();
106 void check_timers();
107 void check_utimers();
108 void rmspace(char *s);
109 void check_timers();
110 void set_chanlist(const char *host, struct userrec *rec);
111 void clear_chanlist(void);
112 void clear_chanlist_member(const char *nick);
113
114 /* cmds.c */
115 int check_dcc_attrs(struct userrec *, int);
116 int check_dcc_chanattrs(struct userrec *, char *, int, int);
117 int stripmodes(char *);
118 char *stripmasktype(int);
119
120 /* dcc.c */
121 void failed_link(int);
122 void dupwait_notify(char *);
123
124 /* dccutil.c */
125 void dprintf EGG_VARARGS(int, arg1);
126 void chatout EGG_VARARGS(char *, arg1);
127 extern void (*shareout) ();
128 extern void (*sharein) (int, char *);
129 void chanout_but EGG_VARARGS(int, arg1);
130 void dcc_chatter(int);
131 void lostdcc(int);
132 void removedcc(int);
133 void makepass(char *);
134 void tell_dcc(int);
135 void not_away(int);
136 void set_away(int, char *);
137 void dcc_remove_lost(void);
138
139 void flush_lines(int, struct chat_info *);
140 struct dcc_t *find_idx(int);
141 int new_dcc(struct dcc_table *, int);
142 void del_dcc(int);
143 char *add_cr(char *);
144 void changeover_dcc(int, struct dcc_table *, int);
145
146 /* dns.c */
147 void dns_hostbyip(char *);
148 void dns_ipbyhost(char *);
149 void call_hostbyip(char *, char *, int);
150 void call_ipbyhost(char *, char *, int);
151 void dcc_dnshostbyip(char *);
152 void dcc_dnsipbyhost(char *);
153
154 /* gotdcc.c */
155 void gotdcc(char *, char *, struct userrec *, char *);
156 void do_boot(int, char *, char *);
157 int detect_dcc_flood(time_t *, struct chat_info *, int);
158
159 /* main.c */
160 void fatal(const char *, int);
161 void patch(const char *);
162 void backup_userfile(void);
163
164 /* misc.c */
165 int egg_strcatn(char *dst, const char *src, size_t max);
166 int my_strcpy(char *, char *);
167 int putlog EGG_VARARGS(int, arg1);
168 void flushlogs();
169 void check_logsize();
170 void maskhost(const char *, char *);
171 char *stristr(char *, char *);
172 void splitc(char *, char *, char);
173 void splitcn(char *, char *, char, size_t);
174 char *newsplit(char **);
175 void stridx(char *, char *, int);
176 void dumplots(int, const char *, char *);
177 void daysago(time_t, time_t, char *);
178 void days(time_t, time_t, char *);
179 void daysdur(time_t, time_t, char *);
180 void help_subst(char *, char *, struct flag_record *, int, char *);
181 void sub_lang(int, char *);
182 void show_motd(int);
183 void tellhelp(int, char *, struct flag_record *, int);
184 void tellwildhelp(int, char *, struct flag_record *);
185 void tellallhelp(int, char *, struct flag_record *);
186 void showhelp(char *, char *, struct flag_record *, int);
187 void rem_help_reference(char *file);
188 void add_help_reference(char *file);
189 void debug_help(int);
190 void reload_help_data(void);
191 char *extracthostname(char *);
192 void show_telnet_banner(int i);
193 void make_rand_str(char *, int);
194 int oatoi(const char *);
195 int is_file(const char *);
196 void logsuffix_change(char *);
197 char *str_escape(const char *str, const char div, const char mask);
198 char *strchr_unescape(char *str, const char div, register const char esc_char);
199 void str_unescape(char *str, register const char esc_char);
200 #if (TCL_MAJOR_VERSION >= 8 && TCL_MINOR_VERSION >= 1) || (TCL_MAJOR_VERSION >= 9)
201 void str_nutf8tounicode(char *str, int len);
202 #endif
203 void kill_bot(char *, char *);
204
205 /* net.c */
206 unsigned long iptolong(IP);
207 IP getmyip();
208 struct in6_addr getmyip6();
209 void neterror(char *);
210 void setsock(int, int);
211 int allocsock(int, int);
212 int getsock(int);
213 void killsock(int);
214 int answer(int, char *, char *, unsigned short *, int);
215 inline int open_listen(int *, int);
216 int open_address_listen(char *, int *);
217 int open_telnet(char *, int);
218 int open_telnet_dcc(int, char *, char *);
219 int open_telnet_raw(int, char *, int);
220 void tputs(int, char *, unsigned int);
221 void dequeue_sockets();
222 int sockgets(char *, int *);
223 void tell_netdebug(int);
224 char *iptostr(IP);
225 char *getlocaladdr(int);
226 int sock_has_data(int, int);
227 int sockoptions(int sock, int operation, int sock_options);
228 int flush_inbuf(int idx);
229
230 /* tcl.c */
231 void protect_tcl();
232 void unprotect_tcl();
233 void do_tcl(char *, char *);
234 int readtclprog(char *fname);
235 int findidx(int);
236 int findanyidx(int);
237
238 /* userent.c */
239 void list_type_kill(struct list_type *);
240 int xtra_set();
241
242 /* userrec.c */
243 struct userrec *adduser(struct userrec *, char *, char *, char *, int);
244 void addhost_by_handle(char *, char *);
245 void clear_masks(struct maskrec *);
246 void clear_userlist(struct userrec *);
247 int u_pass_match(struct userrec *, char *);
248 int delhost_by_handle(char *, char *);
249 int ishost_for_handle(char *, char *);
250 int count_users(struct userrec *);
251 int deluser(char *);
252 void freeuser(struct userrec *);
253 int change_handle(struct userrec *, char *);
254 void correct_handle(char *);
255 int write_user(struct userrec *u, FILE * f, int shr);
256 void write_userfile(int);
257 struct userrec *check_dcclist_hand(char *);
258 void touch_laston(struct userrec *, char *, time_t);
259 void user_del_chan(char *);
260 char *fixfrom(char *);
261
262 /* users.c */
263 void addignore(char *, char *, char *, time_t);
264 int delignore(char *);
265 void tell_ignores(int, char *);
266 int match_ignore(char *);
267 void check_expired_ignores();
268 void autolink_cycle(char *);
269 void tell_file_stats(int, char *);
270 void tell_user_ident(int, char *, int);
271 void tell_users_match(int, char *, int, int, int, char *);
272 int readuserfile(char *, struct userrec **);
273
274 #endif /* _EGG_PROTO_H */

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23