isAuthService

Inspects an IRCUser and judges whether or not it is authentication services.

This is very ad-hoc.

pure @safe
isAuthService
(,
const ref IRCParser parser
)

Parameters

sender IRCUser

IRCUser to examine.

parser IRCParser

Reference to the current IRCParser.

Return Value

Type: auto

true if the sender is judged to be from nickname services, false if not.

Examples

IRCUser user;

if (user.isAuthService(parser))
{
    // ...
}
IRCParser parser;

{
    immutable event = parser.toIRCEvent(":Q!TheQBot@CServe.quakenet.org " ~
        "NOTICE kameloso :You are now logged in as kameloso.");
    assert(event.sender.isAuthService(parser));
}
{
    immutable event = parser.toIRCEvent(":NickServ!NickServ@services. " ~
        "NOTICE kameloso :This nickname is registered.");
    assert(event.sender.isAuthService(parser));
}

parser.server.address = "irc.rizon.net";
parser.server.resolvedAddress = "irc.uworld.se";

{
    immutable event = parser.toIRCEvent(":NickServ!service@rizon.net " ~
        "NOTICE kameloso^^ :nick, type /msg NickServ IDENTIFY password. Otherwise,");
    assert(event.sender.isAuthService(parser));
}