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

Annotation of /botnetop.mod/botnetop.h

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


Revision 1.6 - (hide annotations) (download) (as text)
Sat Nov 11 16:13:02 2000 UTC (18 years, 5 months ago) by sup
Branch: MAIN
Changes since 1.5: +3 -2 lines
File MIME type: text/x-csrc
Updated to v1.0.0

1 sup 1.3 /*
2     * botnetop.h -- part of botnetop.mod
3     *
4 sup 1.6 * $Id: botnetop.h,v 1.5 2000/10/13 20:22:48 sup Exp $
5 sup 1.3 */
6     /*
7 guppy 1.1 * 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 sup 1.4
29 sup 1.3 /* misc.c */
30 guppy 1.1 static int matchattr(struct userrec *, char *, char *);
31 sup 1.4 static int isop(char *, struct chanset_t *);
32     static int handisop(char *, struct chanset_t *);
33     static int lowbots(struct chanset_t *);
34    
35 sup 1.3 /* botcmds.c */
36 guppy 1.1 static void bnop_reqop(char *);
37 sup 1.3 static void bnop_askbot(char *, char *);
38     static void bnop_letmein(char *, char *);
39 sup 1.4
40     /* delay.c */
41     struct delay_t {
42 sup 1.5 struct delay_t *next; /* Next delay record */
43     char chan[81]; /* Channel name */
44     char bot[HANDLEN]; /* Name of the bot */
45     int reqtime; /* Time to wait before requesting ops */
46     int resptime; /* Time to wait before settings reqs to 0 */
47     int reqs; /* Number of requests */
48 sup 1.4 };
49 sup 1.5 static struct delay_t *find_delay(char *);
50     static struct delay_t *add_delay(char *, char *);
51     static void del_delay(struct delay_t *);
52     static void check_delay();
53 sup 1.4 static void delay_free_mem();
54 sup 1.5 static int delay_expmem();
55    
56     /* who.c */
57     struct who_t {
58     struct who_t *next; /* Next who record */
59     char nick[NICKLEN]; /* Nickname of the user */
60     char chan[81]; /* Channel name */
61     char bot[HANDLEN]; /* Name of the bot */
62     char uhost[UHOSTLEN]; /* Userhost of the user */
63     int time; /* Time when the element was created */
64     };
65     static struct who_t *find_who(char *);
66     static struct who_t *add_who(char *, char *, char *, char *);
67     static void del_who(struct who_t *);
68     static void check_who();
69     static void who_free_mem();
70     static int who_expmem();
71    
72     /* needs.c */
73     struct needs_t {
74     struct needs_t *next; /* Next needs record */
75     char chan[81]; /* Channel name */
76     int kjoin; /* Join the channel? */
77     int kjoin_time; /* Time to wait before setting kjoin to 0 */
78     int key; /* Need a key for the channel? */
79     int k_time; /* Time to wait before setting key to 0 */
80     int invite; /* Need an invite for the channel? */
81     int i_time; /* Time to wait before setting invite to 0 */
82     int limit; /* Need a limit raise on the channel? */
83     int l_time; /* Time to wait before setting limit to 0 */
84     int unban; /* Need an unban on the channel? */
85     int u_time; /* Time to wait before setting unban to 0 */
86     };
87     static struct needs_t *find_needs(char *);
88     static struct needs_t *add_needs(char *);
89     static void del_needs(struct needs_t *);
90     static void check_needs();
91     static void needs_free_mem();
92     static int needs_expmem();
93    
94     /* Macros */
95 sup 1.6 #ifndef strncpyz
96 sup 1.5 #define strncpyz(target, source, len) do { \
97     strncpy((target), (source), (len) - 1); \
98     (target)[(len) - 1] = 0; \
99     } while (0)
100 sup 1.6 #endif
101 sup 1.4
102 guppy 1.1 #endif /* MAKING_BOTNETOP */
103    
104     #endif /* _EGG_MOD_BOTNETOP_BOTNETOP_H */

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23