Irc masks

Decription of the standard IRC masks
Simple masks

An irc mask is a string in a special format that identifies an user on irc.
The standard basic format is:
The <nick> part contains the nickname with that the user is widely known across the network.
The nickname format is generally restricted by the irc network rules: usually it has a maximum length (9 on actual IrcNet servers for example), and can contain only a defined set of characters. Just as example, the character '!' obviously can't be included in a nickname.
The <username> part is the machine username of the remote user: this is usually retrieved by the irc server at connect time by contacting the ident service on the user's machine. Some IRC servers allow specifying this username inside the login messages and do not connect to the ident service at all.
The <username> often has a special prefix character added by the irc server:
this is rather server specific protocol , but the prefixes are somewhat standardized and the common meanings of them are:
noprefix: I line with ident
^: I line with OTHER type ident
~: I line, no ident
+: i line with ident
=: i line with OTHER type ident
-: i line, no ident
So finally you can find <username> strings like "~pragma" or "^pragma", where "pragma" is the system username of the irc-user and ~ and ^ are prefixes.
The <host> part is the hostname of the remote user.
In most cases it is the human-readable format of the host name, but sometimes it happens to be an IP-address (when the host has no reverse dns entry).
The IP address can be either in IPV4 format or in IPV6 format.
Some (weird from my point of view) servers hide certain parts of the IP address to prevent attacks to the user's machine.
Here are some examples of full irc-masks:
The irc-masks are case insensitive.

Wildcard masks

In some contexts the irc-masks can contain '*' and '?' wildcards.
The wild masks are used to "match" an user within a set of them.
'*' matches any sequence (eventually empty) of characters and '?' matches a single character.
Wildcards are allowed only in the <nick> , <user> and <host> part: so the "wildest" mask possible is:
that designates "any nickname, any username on any host".
Here are some examples of wild masks:
Pragma!*pragma@212.101.102.*: matches any user with nickname "Pragma" , username that ends with "pragma" and coming from any machine on the 212.101.102 network.
*!solo@* matches any nick with username solo (no prefix!) coming from any machine in the domain.
Pragma!*@*: matches any user with nickname "Pragma".

Index, Miscellaneous
KVIrc 3.9.99 Documentation
Generated by root at Wed Oct 17 19:34:06 2007