Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

A few tweaks

  • Loading branch information...
commit 47c259e47f6b4dc078383cfbbdb2ab1e2f45d278 1 parent da1905b
Jarrod authored
Showing with 3 additions and 2 deletions.
  1. +1 −1  README.pod
  2. +2 −1  lib/Net/IRC/Bot.pm
View
2  README.pod
@@ -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
3  lib/Net/IRC/Bot.pm
@@ -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,
Please sign in to comment.
Something went wrong with that request. Please try again.