Skip to content

Instantly share code, notes, and snippets.

@nillkitty
Last active September 28, 2021 23:05
Show Gist options
  • Save nillkitty/77bad621d847a81d9cd68fb6f59c1cc7 to your computer and use it in GitHub Desktop.
Save nillkitty/77bad621d847a81d9cd68fb6f59c1cc7 to your computer and use it in GitHub Desktop.
IRC - Services Integration Proposal (2007)
Embedded Services
(C) 2007 Alexis Damon
Abstract
This memo is provided as an informational document in hopes that it will
be useful. It also serves as a specification of my own extensions to IRC.
Introduction
Embedded services is the practice of integrating ownership, persistancy,
memorandums, and other services into the daemon process that runs the rest
of the IRC network, instead of having it run in a seperate centralized process.
Scope of Extension
The specifications herein are designed to extend the IRC (RFC1459), IRC2
(RFC2810-2813), and IRCX (draft-pfenning-irc-extensions-04). Wherever possible,
commands and messages have been built upon existing IRC and IRCX prototypes.
Profile Service
The profile service provides a service of identity authentication for IRC users.
Users may identify to their own personal profile via authentication, and set up
any global options that affect them with other services.
The Profile Object
A new object, the profile, is created to contain all of the persistant
data that registered accounts will store. Profiles are uniquely identified
by their profile name, which begins with the "." prefix. Referring to "."
with no profile name after it on IRC refers to the currently logged in profile
if one exists.
Profile Properties
NAME This is the name of the profile. Once created, this property
is read only and cannot be changed.
INFO This is a short line of information displayed to users that query
the profile. It is identitical to the purpose of a real name or
server description is to their respective objects.
CREATION The UNIX-Style timestamp of the creation of the profile. This
property is read-only.
LASTLOGIN The UNIX-Style timestamp of the last login to the profile. This
is also used internally to compute expiration times of dormant
profiles. This property is read-only. This property can only
be read by the owner and system operators.
KEY The key used to authenticate the owner of the profile. This can
also be set with profile mode +k. This property is write-only.
OID The internal object identifier of the profile object. This
property is read-only, and should be set to '0' if not supported.
EMAIL An email address where the owner can be reached, and can only
be read by the owner and system operators, unless the profile
mode +p is set (public email address).
CONTACT A list of semicolon-seperated URI's that list public forms of
contact for the owner. For example: "http://www.mywebpage.com/;
aim:goIM?screenname=mister+sprinkles".
Profile Access Lists
DENY Represents a list of users that may not identify to this
profile.
GRANT Represents a list of users that are automatically identified
to this profile.
SILENCE Represents a list of users that will be copied to the user's
/silence list when they identify to this profile.
Profile Modes
+b <mask> Analogous to the DENY access list.
+e <mask> Analogous to the GRANT access list.
+k <key> Analogous to the KEY property.
+p When set, the e-mail address is viewable by all users.
+m When set, the user does not wish to recieve mail messages.
+f When set, the user wishes to automatically forward messages
to offline nicknames owner by this profile to the profile's
mailbox.
+a When set, the user wishes to automatically forward messages
recieved while away to their mail box.
+u <mode> Automatic usermode. When set, the specified usermode will
automatically be applied to the owner when they identify to
this profile.
+o <type> System Operator. When set, the owner will be promoted to
system operator of the specified type (implementation dependant)
upon identification. This mode can only be set by administrators
and the server.
+R When set, the user does not accept mail from users that are not
logged in to a profile.
Profile Related Commands
LOGIN
Syntax: LOGIN <profile name> <key>
Attempts to manually authenticate to an account using a plaintext
key.
AUTH
Syntax: AUTH <mechanism> <profile name> {I|S} :<hash>
Attempts to start an authentication process to autnenticate to
a profile. The details of this command are described in the IRCX
draft (draft-pfenning-irc-extensions-04).
LOGOUT
Syntax: LOGOUT
Logs the user out of the current profile (if any) that they are logged
into.
PROP
Syntax: PROP <profile> {*|<property name>} [<value>]
Reads or sets properties of a profile. See the IRCX draft
(draft-pfenning-irc-extensions-04) for information on the PROP command.
MODE
Syntax: MODE <profile> [<mode change>]
Reads or changes the mode of a profile. See the IRC specification
(RFC1459) for information on the MODE command.
ACCESS
Syntax: ACCESS <profile> {ADD|DELETE|CLEAR|LIST} [{DENY|GRANT|SILENCE}
[<mask> [<timeout> [<reason>]]]]
Lists, deletes, adds, or deletes access entries to profile access lists.
See the IRCX draft (draft-pfenning-irc-extensions-04) for information
on the ACCESS command.
WHOIS
A query can be made on a profile by using the WHOIS query on it:
Syntax: WHOIS <profile name>
If the profile is identified to by a user, that user's whois reply
is returned, otherwise the offline profile reply is returned:
* .profile-name is .profile-name (profile info)
* .profile-name welcomes mail messages
* .profile-name email address is ted.johnson@example.net
* .profile-name can be contacted at msn:tedj@hotmail.com
* .profile-name End of WHOIS list.
Nickname Service
The nickname service allows profile owners to register certain nicknames
to be reserved for their use. This service is optional. This service
requires the profile service.
Registering a Nickname
Registering a nickname is done via the REGISTER command. A user must
be using the nickname they wish to register unless they are a system
operator. A user must be logged in to a profile before registering
a nickname to it.
Syntax: REGISTER <nickname>
Using a registered nickname
A registered nickname can only be used by the owner of the nickname. An
owner can use their nickname in one of three ways:
1. When logging on to IRC, they can use the PASS command followed by the
initial NICK command with their profile password and the registered nickname.
2. Connected users can use the syntax /NICK <nickname> <profile key> to
change to a registered nickname and login to the profile at the same time.
3. A user can also /LOGIN to their profile and then /NICK to the registered
nickname.
Unregistering a nickname.
A registered nickname can be dropped explicitly by using the /DROP command:
DROP <nickname>
A registered nickname may also be automatically dropped by the server
after a certain amount of dormant time.
Querying for the owner of a registered nickname.
The owner of a nickname can be viewed by using the /WHOIS query on
the nickname.
When the nickname is in use:
* nickname is user@host * real name
* nickname is .profile-name (profile info)
* nickname on server.name (server info)
* nickname on #channel
* nickname email address is ted.johnson@gmail.com
* nickname can be contacted at msn:tedj@hotmail.com
* nickname End of WHOIS list.
When the nickname is offline:
* nickname is currently offline.
* nickname is .profile-name (profile info)
* nickname forwards offline messages to their inbox.
* nickname left 39mins 31secs ago (Ping timeout)
* nickname End of WHOIS list.
Viewing what nicknames a profile owns:
Syntax: ASSETS <profile name>
Example reply:
* .profile-name owns nick: nickname
* .profile-name owns channel: #channel
* .profile-name End of ASSETS list
Channel Service
The channel service allows profile owners to register a permanent channel
and link it to their profile. This service is optional and requires the
profile service.
A user must be in, and have operator privileges on, a channel they wish
to register.
Registering a channel:
Syntax: REGISTER <channel name>
Using a registered channel:
Once a channel is registered, it will always exist, even when empty
(due to it's +r mode), and retain any settings and properties set.
To gain access to a registere channel, an owner can either use their
profile's key when joining (/join #channel key) if they are not identified,
or they can login and then join the channel. They can also optionally
use the OWNER access list on the channel if the server supports such an
access list.
Dropping a channel:
Channels can be deregistered with the DROP command:
Syntax: DROP <channel name>
Channels can be automatically dropped by the server if they are dormant
for a period of time.
Querying for the owner of a registered channel.
To query the owner of a registered channel, query the OWNER property
of the channel:
PROP <channel> OWNER
Example reply: * #channel OWNER .profile-name (profile info)
Viewing what channels a profile owns:
Syntax: ASSETS <profile name>
Example reply:
* .profile-name owns nick: nickname
* .profile-name owns channel: #channel
* .profile-name End of ASSETS list
Mail Service
The mail service provides a way to send short messages and messages
sent to offline registered nicknames and store them while a user is offline
or away. This service is optional.
Sending mail
Mail is created five ways:
1. Type M - A user sends a message to a profile (/msg .profile-name message).
2. Type O - A user sends a message to an offline nickname that is owned by a
profile that is set +f (auto forward mail). (/msg offline_nickname message).
3. Type A - A user sends a message to an online nickname that is /AWAY and their
profile is +a (save away messages as mail). (/msg away_nickname message).
4. Type C - The server supports the HOST or OP access list on a channel
(auto-op), and the owner of a channel sends an offline message to the channel
(/msg =#channel message), and it is sent to any profile on the HOST/OP and
OWNER access lists.
5. Type S - The server itself sends mail to it's system operators and
administrators about administrative information.
6. Type X - The server creates some automatic message and sends it to a profile
for some reason (e.g. Welcome mail, channel expires soon mail, expire
notifications, etc).
Checking Mail
Upon logging in, the following message is displayed if there is mail awaiting:
* You have mail (xx messages from xx users)
To view mail, use the following command:
MAIL
And you'll recieve a listing of all mail waiting in your inbox, sorted
by type and origin. This will happen automatically when you turn off /AWAY
if you recieve mail while /AWAY. For example:
* O: Kuja (.kuja), 4 messages, 3hrs 4mins ago. [hey...]
* O: Dexter (.nocebo), 1 message, 2days 3hrs 44mins ago. [you're a...]
* X: System, 1 expiry notification, 7secs ago.
* End of inbox listing
To read mail from a user, use the command:
MAIL <nick/profile>
And the messages will be played back. For example:
<Kuja> 4 messages from Kuja!kuja@kraln.com (.kuja)
<Kuja> (10:23:22) hey...
<Kuja> (10:23:27) there?
<Kuja> (10:25:44) guess not.
<Kuja> (10:26:22) I was lonely and my sheets are in the wash.
Messages are automatically removed from the inbox as they are read.
Messages are automatically deleted after 3 successive logouts without being
read.
Mail Options
The following profile modes control mail:
+f Automatically forward offline messages to inbox.
+a Automatically forward messages while away to inbox.
(useful for BNCs).
+R Do not accept mail from users without profiles.
Possible Replies
Only new replies and replies for new commands are listed.
Command Message Description
/LOGIN 830 RPL_LOGGEDIN <profile> :Welcome back, <profile>
831 RPL_YOUHAVEMAIL <profile> :You have mail (xx messages from xx users)
832 RPL_LASTLOGINWAS <profile> :Last login was from <nick!user@host> at <time date>
930 ERR_NOSUCHPROFILE <profile> :No such profile name
464 ERR_PASSWDMISMATCH :Password mismatch
/LOGOUT 833 RPL_LOGGEDOUT :You have successfully logged out.
931 ERR_NOTIDENTIFIED :You're not identified to any profile.
/WHOIS 307 RPL_WHOISREGGEDNICK <nickname> :is <profile name> (<profile info>)
310 RPL_WHOISEXTRAINFO <nickname> :email address is <email>
310 RPL_WHOISEXTRAINFO <nickname> :can be contacted at <contact>
320 RPL_WHOISEXTRAINFO2 <profile> :welcomes mail messages
308 RPL_WHOISOFFLINE <nickname> :is currently offline.
309 RPL_WHOISMAILFWD <nickname> :forwards offline messages to their inbox.
309 RPL_WHOISMAILFWD <nickname> :forwards messages while away to their inbox.
/REGISTER 834 RPL_REGISTERED <object> :successfully registered
932 ERR_NOTIDENTIFIED :You're not identified to any profile.
933 ERR_ALREADYREGGED <object> :is already registered!
934 ERR_NOTCURRENTNICK <nickname> :is not your current nickname
482 ERR_NOCHANOPRIVILEGES <channel> :You are not channel operator
935 ERR_TOOMANYASSETS <object> :You have registered too many {nicknames|channels}
/DROP 932 ERR_NOTIDENTIFIED :You're not identified to any profile.
913 ERR_NOACCESS <object> :No access
835 RPL_DROPPED <object> :successfully dropped
/ASSETS 836 RPL_ASSETS <profile> owns <object type>: <object name>
837 RPL_ENDOFASSETS <profile> :End of ASSETS list
930 ERR_NOSUCHPROFILE <profile> :No such profile name
/MAIL 838 RPL_NOMAIL :You have no mail.
831 RPL_YOUHAVEMAIL <profile> :You have mail (xx messages from xx users)
832 RPL_MAILBOX :<mail type> <origin> [(<profile name>)], <message count>, <time ago> [<preview>].
833 RPL_ENDOFMAILBOX :End of inbox listing.
933 ERR_NOMAILFROMUSER <origin> :You have no mail from them.
/MODE 839 RPL_PROFILEMODEIS <profile> :<profile mode string>
/NICK 433 ERR_NICKNAMEINUSE <nickname> :Nickname is registered and can only be used by the owner.
464 ERR_PASSWDMISMATCH <nickname> :Password mismatch
Security Considerations
There are no security considerations noted at this time.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment