00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef lint
00021 static const char rcsid[] = "$Id: scriptmod.c,v 1.16 2008-10-17 15:57:43 sven Exp $";
00022 #endif
00023
00024 #include <eggdrop/eggdrop.h>
00025 #include "egg_script_internal.h"
00026
00027 extern script_command_t script_bind_cmds[], script_net_cmds[], script_dns_cmds[], script_new_user_cmds[], script_party_cmds[], script_timer_cmds[],
00028 script_log_cmds[], script_config_cmds[], script_misc_cmds[];
00029
00030 static int script_module_unload(char *name)
00031 {
00032 return module_unload(name, MODULE_USER);
00033 }
00034
00035 static script_command_t script_mod_cmds[] = {
00036 {"module", "load", (Function) module_load, NULL, 1, "s", "name", SCRIPT_INTEGER, 0},
00037 {"module", "unload", (Function) script_module_unload, NULL, 1, "s", "name", SCRIPT_INTEGER, 0},
00038 {"module", "add_dir", (Function) module_add_dir, NULL, 1, "s", "dir", SCRIPT_INTEGER, 0},
00039 {"module", "loaded", (Function) module_loaded, NULL, 1, "s", "name", SCRIPT_INTEGER, 0},
00040 {0}
00041 };
00042
00043 EXPORT_SCOPE int script_LTX_start(egg_module_t *modinfo);
00044
00045 int script_LTX_start(egg_module_t *modinfo)
00046 {
00047 socket_owner.module = modinfo;
00048 modinfo->name = "script";
00049 modinfo->author = "eggdev";
00050 modinfo->version = "1.0.0";
00051 modinfo->description = "provides core scripting functions";
00052 modinfo->event_cleanup = script_event_cleanup;
00053
00054 script_create_commands(script_config_cmds);
00055 script_create_commands(script_log_cmds);
00056 script_create_commands(script_bind_cmds);
00057 script_create_commands(script_net_cmds);
00058 script_create_commands(script_dns_cmds);
00059 script_create_commands(script_new_user_cmds);
00060 script_create_commands(script_party_cmds);
00061 script_create_commands(script_timer_cmds);
00062 script_create_commands(script_misc_cmds);
00063 script_create_commands(script_mod_cmds);
00064
00065 return(0);
00066 }