/[cvs]/eggdrop1.9/src/scriptbind.c
ViewVC logotype

Contents of /eggdrop1.9/src/scriptbind.c

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


Revision 1.2 - (show annotations) (download) (as text)
Sun Nov 3 23:16:09 2002 UTC (16 years, 11 months ago) by stdarg
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
File MIME type: text/x-chdr
FILE REMOVED
* Moved md5 code to lib/eggdrop so I can use it for password hashing
* Passwords are stored as standard hex encoding of md5(salt + password)
* Started moving script interface functions to modules/script

1 #include <eggdrop/eggdrop.h>
2
3 /* Prototypes for the commands we create in this file. */
4 static int script_bind(char *table_name, char *mask, script_callback_t *callback);
5 static int script_unbind(char *table_name, char *flags, char *mask, char *name);
6 //static int script_rebind(char *table_name, char *mask, char *command, char *newflags, char *newmask);
7
8 script_command_t script_bind_cmds[] = {
9 {"", "bind", script_bind, NULL, 3, "ssc", "table mask command", SCRIPT_INTEGER, 0},
10 {"", "unbind", script_unbind, NULL, 3, "sss", "table mask command", SCRIPT_INTEGER, 0},
11 // {"", "rebind", script_rebind, NULL, 6, "ssssss", "table flags mask command newflags newmask", SCRIPT_INTEGER, 0},
12 {0}
13 };
14
15 static int script_bind(char *table_name, char *mask, script_callback_t *callback)
16 {
17 bind_table_t *table;
18 int retval;
19
20 table = bind_table_lookup(table_name);
21 if (!table) return(1);
22
23 callback->syntax = strdup(table->syntax);
24 retval = bind_entry_add(table, mask, callback->name, BIND_WANTS_CD, callback->callback, callback);
25 return(retval);
26 }
27
28 static int script_unbind(char *table_name, char *flags, char *mask, char *name)
29 {
30 bind_table_t *table;
31 script_callback_t *callback;
32 int retval;
33
34 table = bind_table_lookup(table_name);
35 if (!table) return(1);
36
37 retval = bind_entry_del(table, -1, mask, name, &callback);
38 if (callback) callback->del(callback);
39 return(retval);
40 }
41
42 /*
43 static int script_rebind(char *table_name, char *flags, char *mask, char *command, char *newflags, char *newmask)
44 {
45 bind_table_t *table;
46
47 table = bind_table_lookup(table_name);
48 if (!table) return(-1);
49 return bind_entry_modify(table, -1, mask, command, newflags, newmask);
50 }
51 */

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23