[project @ 2005-06-28 03:16:45 by unknown_lamer]
[clinton/bobotpp.git] / source / ScriptCommands.C
index 310fd4b..c320f7a 100644 (file)
@@ -14,7 +14,7 @@
 
 // You should have received a copy of the GNU General Public License
 // along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307, USA.
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -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))) \
@@ -646,7 +648,21 @@ ScriptCommands::sendCTCP(SCM to, SCM command , SCM message)
   VERIFY_STRING(message);
 
   IQUEUE->sendCTCP (Utils::scm2str (to), Utils::scm2str (command),
-                  Utils::scm2str (message));
+                   Utils::scm2str (message));
+
   return SCM_UNSPECIFIED;
 }
+
+SCM
+ScriptCommands::sendNotice (SCM to, SCM message)
+{
+  VERIFY_STRING (to);
+  VERIFY_STRING (message);
+
+  return (scm_long2num 
+         (Commands::Notice (Interp::bot, 
+                            Utils::scm2str (to),
+                            Utils::scm2str (message)).getCode ()));
+  
+}
 #endif