Hostmasks

From EggWiki
Revision as of 00:02, 13 February 2022 by Geo (talk | contribs) (Created page with "A "hostmask" is one of the methods Eggdrop uses to distinguish between users on IRC. However, the format often confuses new users. == Sections of a hostmask == There are three parts to a hostmask: The nickname, the ident, and the hostname. These three strings are combined to create a hostmask in the format of "nickname!ident@hostname". === Nickname === The nickname portion of a hostmask is the nickname used by a user on IRC === Ident === The ident is a string (general...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

A "hostmask" is one of the methods Eggdrop uses to distinguish between users on IRC. However, the format often confuses new users.

Sections of a hostmask

There are three parts to a hostmask: The nickname, the ident, and the hostname. These three strings are combined to create a hostmask in the format of "nickname!ident@hostname".

Nickname

The nickname portion of a hostmask is the nickname used by a user on IRC

Ident

The ident is a string (generally) provided by your server when you register with IRC.

Ident history

"Back in the day", the ident value was provided by an ident daemon running on the server. The intent was to associate an IRC connection with a specific user from the server, thereby adding a level of non-repudiation to connections and assisting in banning unwanted users with a dynamic IP (such as reconnecting on a dialup connection). Usually, the ident provided was the account name of the user running the client. However, if the server was queried and did not supply an ident response, the server would instead query the client, which could reply with a customizable string. An IRC server would denote this client-chosen ident by prefixing it with a '~' character (nickname!~ident@hostname.com).

Hostname

The hostname can be either an IP or a string (1.2.3.4, or aol.com).

Matching hostmasks

Eggdrop (and IRC) uses hostmasks in several ways. One such way is to associate users in a channel with users added to the Eggdrop's internal user management system. Because hostmasks can change from connection to connection (or even just changing a nickname) Eggdrop uses hostmask matching with wildcards to make it easier to track users. A '?' will match any single character, and a '*' will match any series of characters

Examples

A user with the ident "trogdor" has a dynamic hostname. It has been seen as dynamic-178.myisp.com, dynamic-152.myisp.com, and dynamic-231.myisp.com. Valid hostmasks to match this user could be:

  • *!trogdor@dynamic-*.myisp.com
  • *!trogdor@dynamic-???.myisp.com

While adding broader hostmasks do make it easier to identify the user, overly broad hostmasks (such as *!*@*.com) will likely lead to users without access matching against hostmasks for users who do have access