diff options
author | Zoffix Znet <cpan@zoffix.com> | 2015-12-13 14:14:10 -0500 |
---|---|---|
committer | Zoffix Znet <cpan@zoffix.com> | 2015-12-13 14:14:10 -0500 |
commit | 22e34475c8fe5d6957525962adb4f65d910e46d0 (patch) | |
tree | d5b539d2c3f9549f8e7152818542dc16d672e2e6 | |
parent | a579b7896ddb10c988bfd4c948dc33cad64085c7 (diff) |
Rename constants to all-caps
-rw-r--r-- | lib/IRC/Client.pm6 | 9 | ||||
-rw-r--r-- | lib/IRC/Client/Plugin.pm6 | 4 | ||||
-rw-r--r-- | lib/IRC/Client/Plugin/Debugger.pm6 | 2 |
3 files changed, 7 insertions, 8 deletions
diff --git a/lib/IRC/Client.pm6 b/lib/IRC/Client.pm6 index 4e95aaf..c8e6ac4 100644 --- a/lib/IRC/Client.pm6 +++ b/lib/IRC/Client.pm6 @@ -32,7 +32,6 @@ class IRC::Client:ver<1.002001> { $!debug and "[server {DateTime.now}] {$str}".put; my $messages = parse-irc $str; MESSAGES: for @$messages -> $message { - $message<handled> = False; $message<pipe> = {}; if ( $message<command> eq 'PRIVMSG' @@ -40,7 +39,7 @@ class IRC::Client:ver<1.002001> { ) { for @!plugs.grep(*.^can: 'privmsg-me') -> $p { my $res = $p.privmsg-me(self, $message); - next MESSAGES unless $res === irc-not-handled; + next MESSAGES unless $res === IRC_NOT_HANDLED; } } @@ -49,19 +48,19 @@ class IRC::Client:ver<1.002001> { ) { for @!plugs.grep(*.^can: 'notice-me') -> $p { my $res = $p.notice-me(self, $message); - next MESSAGES unless $res === irc-not-handled; + next MESSAGES unless $res === IRC_NOT_HANDLED; } } my $cmd = 'irc-' ~ $message<command>.lc; for @!plugs.grep(*.^can: $cmd) -> $p { my $res = $p."$cmd"(self, $message); - next MESSAGES unless $res === irc-not-handled; + next MESSAGES unless $res === IRC_NOT_HANDLED; } for @!plugs.grep(*.^can: 'msg') -> $p { my $res = $p.msg(self, $message); - next MESSAGES unless $res === irc-not-handled; + next MESSAGES unless $res === IRC_NOT_HANDLED; } } } diff --git a/lib/IRC/Client/Plugin.pm6 b/lib/IRC/Client/Plugin.pm6 index deaef50..eda7a0a 100644 --- a/lib/IRC/Client/Plugin.pm6 +++ b/lib/IRC/Client/Plugin.pm6 @@ -1,5 +1,5 @@ -constant irc-handled = "irc plugin handled \x1"; -constant irc-not-handled = "irc plugin not-handled \x2"; +constant IRC_HANDLED = "irc plugin handled \x1"; +constant IRC_NOT_HANDLED = "irc plugin not-handled \x2"; unit class IRC::Client::Plugin:ver<1.002002>; has $.irc; diff --git a/lib/IRC/Client/Plugin/Debugger.pm6 b/lib/IRC/Client/Plugin/Debugger.pm6 index 4c6775c..4ded968 100644 --- a/lib/IRC/Client/Plugin/Debugger.pm6 +++ b/lib/IRC/Client/Plugin/Debugger.pm6 @@ -4,5 +4,5 @@ unit class IRC::Client::Plugin::Debugger:ver<1.002001> is IRC::Client::Plugin; method msg ($irc, $msg) { say Dump $msg, :indent(4); - return irc-not-handled; + return IRC_NOT_HANDLED; } |