Created
June 4, 2016 21:00
-
-
Save zoffixznet/f7a75fe8d02b504591dca06cf0745514 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unit package IRC::Client::Message; | |
role IRC::Client::Message { | |
has $.irc is required; | |
has Str:D $.nick is required; | |
has Str:D $.username is required; | |
has Str:D $.host is required; | |
has Str:D $.usermask is required; | |
has Str:D $.command is required; | |
has Str:D $.server is required; | |
has @.args is required; | |
method Str { "$.command @.args[]" } | |
} | |
constant M = IRC::Client::Message; | |
role Privmsg does M { has $.what; } | |
role Privmsg::Me does Privmsg { } | |
role Privmsg::Channel does Privmsg { has $.channel; } | |
role Notice does M { has $.what; } | |
role Notice::Me does Notice { } | |
role Notice::Channel does Notice { has $.channel; } | |
role Numeric does M { } | |
role Unknown does M { method Str { "❚⚠❚ $.command @.args[]" } } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment