Index: perl/modules/IRC/lib/BarnOwl/Module/IRC.pm
===================================================================
--- perl/modules/IRC/lib/BarnOwl/Module/IRC.pm	(revision 56e72d52601116f990fcc6a15f4e71f51adfd238)
+++ perl/modules/IRC/lib/BarnOwl/Module/IRC.pm	(revision ba2ca664880f07b2be95135157a9e54ddd53684d)
@@ -65,5 +65,5 @@
 sub shutdown {
     for my $conn (values %ircnets) {
-        $conn->disconnect();
+        $conn->conn->disconnect();
     }
 }
@@ -169,5 +169,5 @@
     my $cmd = shift;
     my $conn = get_connection(\@_);
-    $conn->disconnect;
+    $conn->conn->disconnect;
     delete $ircnets{$conn->alias};
 }
@@ -191,5 +191,5 @@
     # Strip whitespace. In the future -- send one message/line?
     $body =~ tr/\n\r/  /;
-    $conn->privmsg($to, $body);
+    $conn->conn->privmsg($to, $body);
     my $msg = BarnOwl::Message->new(
         type        => 'IRC',
@@ -214,5 +214,5 @@
     $channels{$chan} ||= [];
     push @{$channels{$chan}}, $conn;
-    $conn->join($chan);
+    $conn->conn->join($chan);
 }
 
@@ -222,5 +222,5 @@
     my $chan = get_channel(\@_) || die("Usage: $cmd <channel>\n");
     $channels{$chan} = [grep {$_ ne $conn} @{$channels{$chan} || []}];
-    $conn->part($chan);
+    $conn->conn->part($chan);
 }
 
@@ -229,5 +229,5 @@
     my $conn = get_connection(\@_);
     my $nick = shift or die("Usage: $cmd <new nick>\n");
-    $conn->nick($nick);
+    $conn->conn->nick($nick);
 }
 
@@ -236,5 +236,5 @@
     my $conn = get_connection(\@_);
     my $chan = get_channel(\@_) || die("Usage: $cmd <channel>\n");
-    $conn->names($chan);
+    $conn->conn->names($chan);
 }
 
@@ -243,5 +243,5 @@
     my $conn = get_connection(\@_);
     my $who = shift || die("Usage: $cmd <user>\n");
-    $conn->whois($who);
+    $conn->conn->whois($who);
 }
 
@@ -249,5 +249,5 @@
     my $cmd = shift;
     my $conn = get_connection(\@_);
-    $conn->motd;
+    $conn->conn->motd;
 }
 
Index: perl/modules/IRC/lib/BarnOwl/Module/IRC/Connection.pm
===================================================================
--- perl/modules/IRC/lib/BarnOwl/Module/IRC/Connection.pm	(revision eab7a4c4530c5e21dfa6a88f13259657fb19949a)
+++ perl/modules/IRC/lib/BarnOwl/Module/IRC/Connection.pm	(revision ba2ca664880f07b2be95135157a9e54ddd53684d)
@@ -10,14 +10,26 @@
 =head1 DESCRIPTION
 
-This module is a Net::IRC::Connection subclass for BarnOwl's IRC
+This module is a wrapper around Net::IRC::Connection for BarnOwl's IRC
 support
 
 =cut
 
-use base qw(Net::IRC::Connection Class::Accessor Exporter);
-__PACKAGE__->mk_accessors(qw(alias channels owl_connected owl_motd));
+use Net::IRC::Connection;
+
+use base qw(Class::Accessor Exporter);
+__PACKAGE__->mk_accessors(qw(conn alias channels connected motd));
 our @EXPORT_OK = qw(&is_private);
 
 use BarnOwl;
+
+BEGIN {
+    no strict 'refs';
+    my @delegate = qw(nick server);
+    for my $meth (@delegate) {
+        *{"BarnOwl::Module::IRC::Connection::$meth"} = sub {
+            shift->conn->$meth(@_);
+        }
+    }
+};
 
 sub new {
@@ -26,28 +38,29 @@
     my $alias = shift;
     my %args = (@_);
-    my $self = $class->SUPER::new($irc, %args);
+    my $conn = Net::IRC::Connection->new($irc, %args);
+    my $self = bless({}, $class);
+    $self->conn($conn);
     $self->alias($alias);
     $self->channels([]);
-    $self->owl_motd("");
-    $self->owl_connected(0);
-    bless($self, $class);
-
-    $self->add_default_handler(sub { goto &on_event; });
-    $self->add_handler(['msg', 'notice', 'public', 'caction'],
-            sub { goto &on_msg });
-    $self->add_handler(['welcome', 'yourhost', 'created',
+    $self->motd("");
+    $self->connected(0);
+
+    $self->conn->add_default_handler(sub { shift; $self->on_event(@_) });
+    $self->conn->add_handler(['msg', 'notice', 'public', 'caction'],
+            sub { shift; $self->on_msg(@_) });
+    $self->conn->add_handler(['welcome', 'yourhost', 'created',
             'luserclient', 'luserop', 'luserchannels', 'luserme'],
-            sub { goto &on_admin_msg });
-    $self->add_handler(['myinfo', 'map', 'n_local', 'n_global',
+            sub { shift; $self->on_admin_msg(@_) });
+    $self->conn->add_handler(['myinfo', 'map', 'n_local', 'n_global',
             'luserconns'],
             sub { });
-    $self->add_handler(motdstart => sub { goto &on_motdstart });
-    $self->add_handler(motd      => sub { goto &on_motd });
-    $self->add_handler(endofmotd => sub { goto &on_endofmotd });
-    $self->add_handler(join      => sub { goto &on_join });
-    $self->add_handler(part      => sub { goto &on_part });
-    $self->add_handler(disconnect => sub { goto &on_disconnect });
-    $self->add_handler(nicknameinuse => sub { goto &on_nickinuse });
-    $self->add_handler(cping     => sub { goto &on_ping });
+    $self->conn->add_handler(motdstart => sub { shift; $self->on_motdstart(@_) });
+    $self->conn->add_handler(motd      => sub { shift; $self->on_motd(@_) });
+    $self->conn->add_handler(endofmotd => sub { shift; $self->on_endofmotd(@_) });
+    $self->conn->add_handler(join      => sub { shift; $self->on_join(@_) });
+    $self->conn->add_handler(part      => sub { shift; $self->on_part(@_) });
+    $self->conn->add_handler(disconnect => sub { shift; $self->on_disconnect(@_) });
+    $self->conn->add_handler(nicknameinuse => sub { shift; $self->on_nickinuse(@_) });
+    $self->conn->add_handler(cping     => sub { shift; $self->on_ping(@_) });
 
     return $self;
@@ -97,5 +110,5 @@
 sub on_ping {
     my ($self, $evt) = @_;
-    $self->ctcp_reply($evt->nick, join (' ', ($evt->args)));
+    $self->conn->ctcp_reply($evt->nick, join (' ', ($evt->args)));
 }
 
@@ -110,24 +123,24 @@
 sub on_motdstart {
     my ($self, $evt) = @_;
-    $self->owl_motd(join "\n", cdr $evt->args);
+    $self->motd(join "\n", cdr $evt->args);
 }
 
 sub on_motd {
     my ($self, $evt) = @_;
-    $self->owl_motd(join "\n", $self->owl_motd, cdr $evt->args);
+    $self->motd(join "\n", $self->motd, cdr $evt->args);
 }
 
 sub on_endofmotd {
     my ($self, $evt) = @_;
-    $self->owl_motd(join "\n", $self->owl_motd, cdr $evt->args);
-    if(!$self->owl_connected) {
+    $self->motd(join "\n", $self->motd, cdr $evt->args);
+    if(!$self->connected) {
         BarnOwl::admin_message("IRC", "Connected to " .
                                $self->server . " (" . $self->alias . ")");
-        $self->owl_connected(1);
+        $self->connected(1);
         
     }
     BarnOwl::admin_message("IRC",
             BarnOwl::Style::boldify('MOTD for ' . $self->alias) . "\n"
-            . strip_irc_formatting($self->owl_motd));
+            . strip_irc_formatting($self->motd));
 }
 
@@ -163,6 +176,6 @@
                            "[" . $self->alias . "] " .
                            [$evt->args]->[1] . ": Nick already in use");
-    unless($self->owl_connected) {
-        $self->disconnect;
+    unless($self->connected) {
+        $self->conn->disconnect;
     }
 }
