[project @ 2005-06-23 18:49:38 by unknown_lamer]
[clinton/bobotpp.git] / source / ScriptCommands.C
index 310fd4b..b2bdeaf 100644 (file)
@@ -31,6 +31,8 @@
 #include "DCCPerson.H"
 #include "DCCManager.H"
 #include "Parser.H"
+#include "Commands.H"
+#include "Message.H"
 #include <libguile.h>
 
 #define VERIFY_STRING(par) if (!SCM_STRINGP((par))) \
@@ -649,4 +651,23 @@ ScriptCommands::sendCTCP(SCM to, SCM command , SCM message)
                   Utils::scm2str (message));
   return SCM_UNSPECIFIED;
 }
+
+SCM
+ScriptCommands::sendNotice (SCM to, SCM message)
+{
+  VERIFY_STRING (to);
+  VERIFY_STRING (message);
+
+  if (Commands::Notice (Interp::bot, 
+                       Utils::scm2str (to),
+                       Utils::scm2str (message))
+      == Ok)
+    {
+      return SCM_BOOL_T;
+    }
+  else
+    {
+      return SCM_BOOL_F;
+    }
+}
 #endif