git.annexia.org
/
xavierbot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Version 0.9: Use a nickserv password, and some fixes for OCaml 3.11.
[xavierbot.git]
/
xavierbot.pl
diff --git
a/xavierbot.pl
b/xavierbot.pl
index
d1c63f5
..
d229477
100755
(executable)
--- a/
xavierbot.pl
+++ b/
xavierbot.pl
@@
-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.1
3 2008/02/13 17:35:32
rjones Exp $
+# $Id: xavierbot.pl,v 1.1
4 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));