Permalink
Browse files

A few tweaks

  • Loading branch information...
1 parent da1905b commit 47c259e47f6b4dc078383cfbbdb2ab1e2f45d278 Jarrod committed Jul 30, 2011
Showing with 3 additions and 2 deletions.
  1. +1 −1 README.pod
  2. +2 −1 lib/Net/IRC/Bot.pm
View
@@ -16,7 +16,7 @@ Elegant. Simple. Probably compiles.
#Roles can let you break up large event handler modules into smaller ones.
role ExtraAnnoying {
- had %enemies = ('bob', 'sam', 'chanserv') X=> 1;
+ has %enemies = ('bob', 'sam', 'chanserv') X=> 1;
#Magical type constraints only let this event be called when $e.who is an enemy
multi method said ($e where {.who<nick> ~~ %enemies}) {
$e.reply($e.msg); #Parrot back what was said;
View
@@ -26,13 +26,14 @@ class Net::IRC::Bot {
has $debug = False;
#State variables.
+ #TODO: Make this an object for cleaner syntax.
has %state;
submethod BUILD {
callsame;
@modules.push(Net::IRC::DefaultHandlers.new);
}
-
+
method !resetstate() {
%state = (
nick => $nick,

0 comments on commit 47c259e

Please sign in to comment.