From b1e795877f2447bc634cbb4b269f9ac8bebd67f3 Mon Sep 17 00:00:00 2001 From: Zoffix Znet Date: Sun, 7 Aug 2016 22:58:46 -0400 Subject: Add `:alias` feature Closes #22 --- docs/03-method-reference.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'docs/03-method-reference.md') diff --git a/docs/03-method-reference.md b/docs/03-method-reference.md index 9c5f1fa..6963d64 100644 --- a/docs/03-method-reference.md +++ b/docs/03-method-reference.md @@ -354,6 +354,10 @@ the channel and the value is its password. A list of nicks the client uses on this server. If one nick is taken, next one in the list will be attempted to be used. +#### `.alias` + +A list of aliases on this server. + #### `.host` The host of the server. @@ -445,6 +449,7 @@ my $irc = IRC::Client.new: :password :channels<#perl #perl6 #rust-lang> :nick + :alias('foo', /b.r/) :username :userhost :userreal('Mah awesome bot!') @@ -515,8 +520,22 @@ generate three additional nicknames that have underscores appended If one of the given nicks is in use, the client will attempt to use the next one in the list. +##### `:alias` + **Defaults to:** `P6Bot` +```perl6 + :alias('foo', /b.r/) +``` + +A list of `Str` or `Regex` objects that in the context of +`irc-addressed`, `irc-to-me`, and `irc-mentioned` events will be used +as alternative nicks. In other words, specifying `'bot'` as alias will allow +you to address the bot using `bot` nick, regardless of the actual nick the +bot is currently using. + +**Defaults to:** empty list + ##### `:password` The server password to use. On some networks (like Freenode), the server -- cgit v1.1