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

Contents of /botnetop.mod/botnetop.c

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


Revision 1.1.1.1 - (show annotations) (download) (as text) (vendor branch)
Mon Aug 14 01:41:03 2000 UTC (18 years, 10 months ago) by guppy
Branch: botnetop
CVS Tags: botnetop1
Changes since 1.1: +0 -0 lines
File MIME type: text/x-chdr
first checkin

1 /*
2 * Copyright (C) 2000 Teemu Hjelt <temex@iki.fi>
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 */
18
19 #define MODULE_NAME "botnetop"
20 #define MAKING_BOTNETOP
21 #define MODULE_VERSION "0.2.0"
22 #include "../module.h"
23 #include "../irc.mod/irc.h"
24 #include "../server.mod/server.h"
25 #include "../channels.mod/channels.h"
26
27 #undef global
28 static Function *global = NULL, *irc_funcs = NULL, *server_funcs = NULL, *channels_funcs = NULL;
29
30 #include "botnetop.h"
31
32 static int strict_host = 1;
33 static int bop_modeop = 0;
34 static int bop_linkop = 1;
35 static int bop_osync = 0;
36 static int bop_addhost = 0;
37 static int bop_log = 2;
38
39 #include "misc.c"
40 #include "botcmds.c"
41 #include "ircbinds.c"
42 #include "botbinds.c"
43 #include "tclcmds.c"
44
45 static int botnetop_expmem()
46 {
47 return 0;
48 }
49
50 static void botnetop_report(int idx, int details)
51 {
52 if (details) {
53 dprintf(idx, " Tcl commands: bop_reqop, bop_letmein\n");
54 dprintf(idx, " Tcl variables: bop_modeop, bop_linkop, bop_osync, bop_addhost, bop_log\n");
55 }
56 }
57
58 static tcl_ints botnetop_tcl_ints[] =
59 {
60 {"strict-host", &strict_host, 0},
61 {"bop_modeop", &bop_modeop, 0},
62 {"bop_linkop", &bop_linkop, 0},
63 {"bop_osync", &bop_osync, 0},
64 {"bop_addhost", &bop_addhost, 0},
65 {"bop_log", &bop_log, 0},
66 {0, 0, 0}
67 };
68
69 static char *botnetop_close()
70 {
71 Context;
72 rem_builtins(H_join, botnetop_join);
73 rem_builtins(H_mode, botnetop_mode);
74 rem_builtins(H_link, botnetop_link);
75 rem_builtins(H_bot, botnetop_bot);
76 rem_tcl_ints(botnetop_tcl_ints);
77 rem_tcl_commands(botnetop_tcl_cmds);
78 module_undepend(MODULE_NAME);
79 return NULL;
80 }
81
82 char *botnetop_start();
83
84 static Function botnetop_table[] =
85 {
86 (Function) botnetop_start,
87 (Function) botnetop_close,
88 (Function) botnetop_expmem,
89 (Function) botnetop_report,
90 };
91
92 char *botnetop_start(Function * global_funcs)
93 {
94 global = global_funcs;
95 Context;
96 module_register(MODULE_NAME, botnetop_table, 0, 2);
97 if (!(irc_funcs = module_depend(MODULE_NAME, "irc", 1, 0)))
98 return "You need the irc module to use the botnetop module.";
99 if (!(server_funcs = module_depend(MODULE_NAME, "server", 1, 0)))
100 return "You need the server module to use the botnetop module.";
101 if (!(channels_funcs = module_depend(MODULE_NAME, "channels", 1, 0)))
102 return "You need the channels module to use the botnetop module.";
103 if (!module_depend(MODULE_NAME, "eggdrop", 105, 0))
104 return "This module requires eggdrop1.5.0 or later";
105 add_builtins(H_join, botnetop_join);
106 add_builtins(H_mode, botnetop_mode);
107 add_builtins(H_link, botnetop_link);
108 add_builtins(H_bot, botnetop_bot);
109 add_tcl_ints(botnetop_tcl_ints);
110 add_tcl_commands(botnetop_tcl_cmds);
111 putlog(LOG_MISC, "*", "botnetop.mod v%s by Sup loaded.", MODULE_VERSION);
112 return NULL;
113 }

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23