dialect.common

Helper functions needed to parse raw IRC event strings into IRCEvents.

Also things that don't belong anywhere else.

Members

Classes

IRCParseException
class IRCParseException

IRC Parsing Exception, thrown when there were errors parsing.

Enums

IRCControlCharacter
enum IRCControlCharacter

Certain characters that signal specific meaning in an IRC context.

Functions

decodeIRCv3String
auto decodeIRCv3String(string line)

Decodes an IRCv3 tag string, replacing some characters.

isAuthService
auto isAuthService(IRCUser sender, IRCParser parser)

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

isUpper
auto isUpper(char c, IRCServer.CaseMapping caseMapping)

Checks whether the passed char is in uppercase as per the supplied case mappings.

isValidChannel
auto isValidChannel(string channelName, IRCServer server)

Examines a string and judges whether or not it *looks* like a channel.

isValidHostmask
auto isValidHostmask(string hostmask, IRCServer server)

Makes a cursory verification of a hostmask, ensuring that it doesn't contain invalid characters. May very well have false positives.

isValidNickname
auto isValidNickname(string nickname, IRCServer server)

Examines a string and judges whether or not it *looks* like a nickname.

isValidNicknameCharacter
auto isValidNicknameCharacter(ubyte c)

Returns whether or not a passed char can be part of a nickname.

matchesByMask
auto matchesByMask(IRCUser this_, IRCUser that, IRCServer.CaseMapping caseMapping)

Compares this IRCUser with a second one, treating fields with asterisks as glob wildcards, mimicking *!*@* mask matching.

opEqualsCaseInsensitive
auto opEqualsCaseInsensitive(string lhs, string rhs, IRCServer.CaseMapping mapping)

Compares two strings to see if they match if case is ignored.

setMode
void setMode(IRCChannel channel, string signedModestring, string data, IRCServer server)

Sets a new or removes a IRCChannel.Mode.

stripModesign
auto stripModesign(string nickname, IRCServer server, string modesigns)

Takes a nickname and strips it of any prepended mode signs, like the @ in @nickname. Saves the stripped signs in the ref string modesigns.

stripModesign
auto stripModesign(string nickname, IRCServer server)

Convenience function to stripModesign that doesn't take an out string parameter to store the stripped modesign characters in.

toLower
auto toLower(char c, IRCServer.CaseMapping caseMapping)

Produces the passed char in lowercase as per the supplied case mappings.

toLowerCase
auto toLowerCase(string name, IRCServer.CaseMapping caseMapping)

Produces the passed string in lowercase as per the supplied case mappings.

typenumsOf
auto typenumsOf(IRCServer.Daemon daemon)

Returns the typenums mapping for a given IRCServer.Daemon.

Meta