Version 0.9: Use a nickserv password, and some fixes for OCaml 3.11.
authorrjones <rjones>
Sun, 4 Apr 2010 19:38:40 +0000 (19:38 +0000)
committerrjones <rjones>
Sun, 4 Apr 2010 19:38:40 +0000 (19:38 +0000)
Makefile.config
init
init.in
xavierbot.pl
xavierbot.pl.in

index 8af81bd..82c0e16 100644 (file)
@@ -1,8 +1,8 @@
 # -*- Makefile -*-
 # -*- Makefile -*-
-# $Id: Makefile.config,v 1.10 2008/02/13 17:17:45 rjones Exp $
+# $Id: Makefile.config,v 1.11 2010/04/04 19:38:40 rjones Exp $
 
 PACKAGE := xavierbot
 
 PACKAGE := xavierbot
-VERSION := 0.8
+VERSION := 0.9
 
 # Prefix for installation.
 # - Binaries are installed in $(PREFIX)/sbin
 
 # Prefix for installation.
 # - Binaries are installed in $(PREFIX)/sbin
diff --git a/init b/init
index a87e3fd..7608e20 100644 (file)
--- a/init
+++ b/init
@@ -1,5 +1,5 @@
 (* Initialise the toplevel environment. -*- tuareg -*-
 (* Initialise the toplevel environment. -*- tuareg -*-
- * $Id: init,v 1.11 2008/02/13 17:35:32 rjones Exp $
+ * $Id: init,v 1.12 2010/04/04 19:38:40 rjones Exp $
  * - Removes the Pervasives module and any dangerous functions.
  * - Loads just the modules we want to give access to, and just
  *   the functions within those modules that we want to give.
  * - Removes the Pervasives module and any dangerous functions.
  * - Loads just the modules we want to give access to, and just
  *   the functions within those modules that we want to give.
@@ -9,6 +9,7 @@
  *)
 
 (* Load some libraries. *)
  *)
 
 (* Load some libraries. *)
+#load "dynlink.cma";;
 #load "nums.cma";;
 #load "unix.cma";;
 #load "str.cma";;
 #load "nums.cma";;
 #load "unix.cma";;
 #load "str.cma";;
@@ -194,12 +195,11 @@ end = struct include Scanf end
 module StringSet = Set.Make(String)
 module StringMap = Map.Make(String)
 
 module StringSet = Set.Make(String)
 module StringMap = Map.Make(String)
 
-(* Create an object, so we get the CamlinternalOO module. *)
+(* Create an object, so we get the CamlinternalOO module ... *)
 let _ = object end
 
 (* ... but prevent public access to CamlinternalOO. *)
 let _ = object end
 
 (* ... but prevent public access to CamlinternalOO. *)
-module CamlinternalOO : sig
-end = struct end
+module CamlinternalOO = struct end
 
 #load "camlp4o.cma";;
 #load "./pa_noexternal.cmo";;
 
 #load "camlp4o.cma";;
 #load "./pa_noexternal.cmo";;
diff --git a/init.in b/init.in
index 972b8d5..7afac34 100644 (file)
--- a/init.in
+++ b/init.in
@@ -1,5 +1,5 @@
 (* Initialise the toplevel environment. -*- tuareg -*-
 (* Initialise the toplevel environment. -*- tuareg -*-
- * $Id: init.in,v 1.8 2008/02/13 17:35:32 rjones Exp $
+ * $Id: init.in,v 1.9 2010/04/04 19:38:40 rjones Exp $
  * - Removes the Pervasives module and any dangerous functions.
  * - Loads just the modules we want to give access to, and just
  *   the functions within those modules that we want to give.
  * - Removes the Pervasives module and any dangerous functions.
  * - Loads just the modules we want to give access to, and just
  *   the functions within those modules that we want to give.
@@ -9,6 +9,7 @@
  *)
 
 (* Load some libraries. *)
  *)
 
 (* Load some libraries. *)
+#load "dynlink.cma";;
 #load "nums.cma";;
 #load "unix.cma";;
 #load "str.cma";;
 #load "nums.cma";;
 #load "unix.cma";;
 #load "str.cma";;
index d1c63f5..d229477 100755 (executable)
@@ -2,11 +2,12 @@
 # xavierbot : an OCaml interpreter IRC bot.
 # By Richard W.M. Jones <rich@annexia.org>.
 # This code is in the Public Domain.
 # xavierbot : an OCaml interpreter IRC bot.
 # By Richard W.M. Jones <rich@annexia.org>.
 # This code is in the Public Domain.
-# $Id: xavierbot.pl,v 1.13 2008/02/13 17:35:32 rjones Exp $
+# $Id: xavierbot.pl,v 1.14 2010/04/04 19:38:40 rjones Exp $
 
 use strict;
 use POE qw(Component::IRC Wheel::Run);
 use Getopt::Long;
 
 use strict;
 use POE qw(Component::IRC Wheel::Run);
 use Getopt::Long;
+use POE::Component::IRC::Plugin::NickServID;
 
 #----------------------------------------------------------------------
 # Start of configuration.
 
 #----------------------------------------------------------------------
 # Start of configuration.
@@ -17,6 +18,8 @@ my $server = "chat.freenode.net";
 my $port = 6667;
 my $channel = "#ocaml";
 
 my $port = 6667;
 my $channel = "#ocaml";
 
+my $nickservpw = "123456"; # or undef
+
 # End of configuration.
 #----------------------------------------------------------------------
 
 # End of configuration.
 #----------------------------------------------------------------------
 
@@ -62,6 +65,11 @@ sub _start
         port => $port,
         ) or die "POE::Component::IRC->spawn failed: $!";
 
         port => $port,
         ) or die "POE::Component::IRC->spawn failed: $!";
 
+    $irc->plugin_add('NickServID',
+                     POE::Component::IRC::Plugin::NickServID->new(
+                         Password => $nickservpw,
+                     ));
+
     my $ocaml = start_toplevel ();
 
     $kernel->sig(CHLD => qw(got_sigchld));
     my $ocaml = start_toplevel ();
 
     $kernel->sig(CHLD => qw(got_sigchld));
index f1a4cc8..55ddae6 100755 (executable)
@@ -2,11 +2,12 @@
 # xavierbot : an OCaml interpreter IRC bot.
 # By Richard W.M. Jones <rich@annexia.org>.
 # This code is in the Public Domain.
 # xavierbot : an OCaml interpreter IRC bot.
 # By Richard W.M. Jones <rich@annexia.org>.
 # This code is in the Public Domain.
-# $Id: xavierbot.pl.in,v 1.9 2008/01/23 15:44:46 rjones Exp $
+# $Id: xavierbot.pl.in,v 1.10 2010/04/04 19:38:40 rjones Exp $
 
 use strict;
 use POE qw(Component::IRC Wheel::Run);
 use Getopt::Long;
 
 use strict;
 use POE qw(Component::IRC Wheel::Run);
 use Getopt::Long;
+use POE::Component::IRC::Plugin::NickServID;
 
 #----------------------------------------------------------------------
 # Start of configuration.
 
 #----------------------------------------------------------------------
 # Start of configuration.
@@ -17,6 +18,8 @@ my $server = "chat.freenode.net";
 my $port = 6667;
 my $channel = "#ocaml";
 
 my $port = 6667;
 my $channel = "#ocaml";
 
+my $nickservpw = "123456"; # or undef
+
 # End of configuration.
 #----------------------------------------------------------------------
 
 # End of configuration.
 #----------------------------------------------------------------------
 
@@ -62,6 +65,11 @@ sub _start
         port => $port,
         ) or die "POE::Component::IRC->spawn failed: $!";
 
         port => $port,
         ) or die "POE::Component::IRC->spawn failed: $!";
 
+    $irc->plugin_add('NickServID',
+                     POE::Component::IRC::Plugin::NickServID->new(
+                         Password => $nickservpw,
+                     ));
+
     my $ocaml = start_toplevel ();
 
     $kernel->sig(CHLD => qw(got_sigchld));
     my $ocaml = start_toplevel ();
 
     $kernel->sig(CHLD => qw(got_sigchld));