/[cvs]/botnetop.mod/botnetop.h
ViewVC logotype

Contents of /botnetop.mod/botnetop.h

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


Revision 1.5 - (show annotations) (download) (as text)
Fri Oct 13 20:22:48 2000 UTC (19 years ago) by sup
Branch: MAIN
Changes since 1.4: +56 -10 lines
File MIME type: text/x-csrc
Updated to 1.0.0pre5

1 /*
2 * botnetop.h -- part of botnetop.mod
3 *
4 * $Id: botnetop.h,v 1.3 2000/08/25 20:19:17 sup Exp $
5 */
6 /*
7 * Copyright (C) 2000 Teemu Hjelt <temex@iki.fi>
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version 2
12 * of the License, or (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 */
23
24 #ifndef _EGG_MOD_BOTNETOP_BOTNETOP_H
25 #define _EGG_MOD_BOTNETOP_BOTNETOP_H
26
27 #ifdef MAKING_BOTNETOP
28
29 /* misc.c */
30 static int matchattr(struct userrec *, char *, char *);
31 static int isop(char *, struct chanset_t *);
32 static int handisop(char *, struct chanset_t *);
33 static int lowbots(struct chanset_t *);
34
35 /* botcmds.c */
36 static void bnop_setneed(char *);
37 static void bnop_reqop(char *);
38 static void bnop_askbot(char *, char *);
39 static void bnop_letmein(char *, char *);
40
41 /* delay.c */
42 struct delay_t {
43 struct delay_t *next; /* Next delay record */
44 char chan[81]; /* Channel name */
45 char bot[HANDLEN]; /* Name of the bot */
46 int reqtime; /* Time to wait before requesting ops */
47 int resptime; /* Time to wait before settings reqs to 0 */
48 int reqs; /* Number of requests */
49 };
50 static struct delay_t *find_delay(char *);
51 static struct delay_t *add_delay(char *, char *);
52 static void del_delay(struct delay_t *);
53 static void check_delay();
54 static void delay_free_mem();
55 static int delay_expmem();
56
57 /* who.c */
58 struct who_t {
59 struct who_t *next; /* Next who record */
60 char nick[NICKLEN]; /* Nickname of the user */
61 char chan[81]; /* Channel name */
62 char bot[HANDLEN]; /* Name of the bot */
63 char uhost[UHOSTLEN]; /* Userhost of the user */
64 int time; /* Time when the element was created */
65 };
66 static struct who_t *find_who(char *);
67 static struct who_t *add_who(char *, char *, char *, char *);
68 static void del_who(struct who_t *);
69 static void check_who();
70 static void who_free_mem();
71 static int who_expmem();
72
73 /* needs.c */
74 struct needs_t {
75 struct needs_t *next; /* Next needs record */
76 char chan[81]; /* Channel name */
77 int kjoin; /* Join the channel? */
78 int kjoin_time; /* Time to wait before setting kjoin to 0 */
79 int key; /* Need a key for the channel? */
80 int k_time; /* Time to wait before setting key to 0 */
81 int invite; /* Need an invite for the channel? */
82 int i_time; /* Time to wait before setting invite to 0 */
83 int limit; /* Need a limit raise on the channel? */
84 int l_time; /* Time to wait before setting limit to 0 */
85 int unban; /* Need an unban on the channel? */
86 int u_time; /* Time to wait before setting unban to 0 */
87 };
88 static struct needs_t *find_needs(char *);
89 static struct needs_t *add_needs(char *);
90 static void del_needs(struct needs_t *);
91 static void check_needs();
92 static void needs_free_mem();
93 static int needs_expmem();
94
95 /* Macros */
96 #define strncpyz(target, source, len) do { \
97 strncpy((target), (source), (len) - 1); \
98 (target)[(len) - 1] = 0; \
99 } while (0)
100
101 #endif /* MAKING_BOTNETOP */
102
103 #endif /* _EGG_MOD_BOTNETOP_BOTNETOP_H */

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23