X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=Delling.pm;h=8008e810f2e9523d1bab6f91052817e56b1e9806;hb=6815b7a875e95937693864b76a028f92ee2cbf35;hp=224a6572650bfccd2109e34016d87a8d96ece066;hpb=84affcdf70684e8f29e83dc2c3ab75520da383d7;p=NDIRC.git diff --git a/Delling.pm b/Delling.pm index 224a657..8008e81 100644 --- a/Delling.pm +++ b/Delling.pm @@ -36,7 +36,7 @@ has hal => ( lazy_build => 1, ); -sub irc_public { +after irc_public => sub { my ($self,$sender, $who, $where, $msg) = @_[OBJECT,SENDER, ARG0 .. ARG2]; my ($nick,$username,$address) = ( split /[!@]/, $who ); my $channel = $where->[0]; @@ -63,9 +63,9 @@ sub irc_public { if ($self->parseCommand($msg,$irc,$nick,$address,$channel,$dbh)){ #Command parsed and run successfully } -} +}; -sub irc_msg { +after irc_msg => sub { my ($self,$sender, $who, $where, $msg) = @_[OBJECT,SENDER, ARG0 .. ARG2]; my ($nick,$username,$address) = ( split /[!@]/, $who ); my $irc = $sender->get_heap(); @@ -79,7 +79,7 @@ sub irc_msg { }else{ $irc->yield(notice => $nick, "unknown command"); } -} +}; sub irc_join { my ($self,$sender, $who, $channel) = @_[OBJECT,SENDER, ARG0 .. ARG1];