Skip to content
Browse files

Make sure we get default handlers in place. Gets us joining again.

  • Loading branch information...
1 parent af5af22 commit 15662a1d8e48525b6618538397dd546924287a38 @jnthn jnthn committed May 16, 2012
Showing with 5 additions and 4 deletions.
  1. +5 −4 lib/Net/IRC/Bot.pm
View
9 lib/Net/IRC/Bot.pm
@@ -29,9 +29,11 @@ class Net::IRC::Bot {
#TODO: Make this an object for cleaner syntax.
has %state is rw;
- #submethod BUILD {
- # @!modules.push(Net::IRC::DefaultHandlers.new);
- #}
+ method new(|$) {
+ my $obj = callsame();
+ $obj.modules.push(Net::IRC::DefaultHandlers.new);
+ $obj
+ }
method !resetstate() {
%state = (
@@ -107,7 +109,6 @@ class Net::IRC::Bot {
:what(~$raw<params>[$l ?? $l-1 !! 0]),
);
-
# Dispatch to the raw event handlers.
@.modules>>.*"irc_{ lc $event.command }"($event);
given uc $event.command {

0 comments on commit 15662a1

Please sign in to comment.
Something went wrong with that request. Please try again.