use lib ; use IRC::Client; class Trickster { multi method irc-to-me ($ where /time/) { DateTime.now } multi method irc-to-me ($ where /temp \s+ $=\d+ $=[F|C]/) { $ eq 'F' ?? "That's {($ - 32) × .5556}°C" !! "That's { $ × 1.8 + 32 }°F" } } class BFF { method irc-to-me ($ where /'♥'/) { 'I ♥ YOU!' } } .run with IRC::Client.new: :nick :alias('foo', /b.r/) :host(%*ENV // 'irc.freenode.net') :channels<#zofbot> :debug :plugins(Trickster, BFF)