[project @ 2002-08-02 04:31:30 by unknown_lamer]
[clinton/bobotpp.git] / source / Interp.C
index f4de9ee..c00041c 100644 (file)
@@ -49,7 +49,8 @@ scm_apply_wrapper(void *data)
 void
 Interp::Startup()
 {
-//  scm_primitive_load_path(scm_makfrom0str("ice-9/boot-9.scm"));
+  // Hooks
+  scm_c_define ("bot:exit-hook", scm_make_hook (scm_long2num (0)));
 
   // Symbols
   // bot:user-*
@@ -146,11 +147,16 @@ Interp::Startup()
   bot_new_procedure ("bot:delcommand", (SCMFunc)ScriptCommands::delCommand, 
                     1, 0, 0);
   bot_new_procedure ("bot:addhook", (SCMFunc)ScriptCommands::AddHook, 
-                    3, 2, 0);
+                    3, 3, 0);
   bot_new_procedure ("bot:addtimer", (SCMFunc)ScriptCommands::AddTimer, 
                     2, 0, 0);
   bot_new_procedure ("bot:deltimer", (SCMFunc)ScriptCommands::DelTimer, 
                     1, 0, 0);
+
+  // "Low Level" Message functuions
+  scm_c_define_gsubr ("bot:send-CTCP", 3, 0, 0,
+                     (SCMFunc)ScriptCommands::sendCTCP);
+
   // load bobot-utils
   scm_primitive_load 
     (scm_makfrom0str (String(PREFIX) + 
@@ -161,7 +167,9 @@ Interp::Startup()
 
 void
 Interp::Shutdown()
-{ }
+{ 
+  scm_c_run_hook (gh_lookup ("bot:exit-hook"), SCM_EOL);
+}
 
 void
 Interp::Execute(Bot *b, String command)