Permalink
Browse files

Cheer up guys! Unsmith works again!

  • Loading branch information...
1 parent c4a2188 commit d4b32f35770f0af470b42c7f4bcb998c0cb97a08 @TiMBuS committed Jul 21, 2012
Showing with 13 additions and 6 deletions.
  1. +13 −6 lib/Net/IRC/Modules/ACME.pm
@@ -13,12 +13,19 @@ class Net::IRC::Modules::ACME::Eightball {
class Net::IRC::Modules::ACME::Unsmith {
has @replies = open('Net/IRC/Modules/unsmith').lines;
- my regex sad {
- [ ^|\s ]
- [ [ [':'|'='] <[\<\(\[]> ] | [ 'un'?'smith' ] | 'sad''face'? ]
- [ $|\s ]
- }
- multi method said ( $ev where {.what ~~ /<.sad>/} ) {
+# XXX: Can't use this. Seems to be some kind of rakudo bug.
+# my regex sad {
+# [ ^|\s ]
+# [ [ [':'|'='] <[\<\(\[]> ] | [ 'un'?'smith' ] | 'sad''face'? ]
+# [ $|\s ]
+# }
+ multi method said ( $ev where {
+ .what ~~ m/
+ [ ^|\s ]
+ [ [ [':'|'='] <[\<\(\[]> ] | [ 'un'?'smith' ] | 'sad''face'? ]
+ [ $|\s ]
+ /}) {
+
$ev.msg(@replies.pick);
}
}

0 comments on commit d4b32f3

Please sign in to comment.