Earendil IRC Protocol Specification

Version 0.0

This document compiles the information in RFC 2812 in a straightforward way, derived from a concise but human-editable definition. There is also a JSON version of this document, suitable for use in code generation.

The messages in this document are divided into sections, corresponding to sections of the RFC.

3.1 Connection Registration

PASS <password>

Name: pass

Related: need-more-params, already-registered.

NICK <nickname>

Name: nick

Related: no-nickname-given, erroneus-nickname, nickname-in-use, nick-collision, unavail-resource, restricted.

USER <user> <int:mode> * <realname>

Name: user

Related: need-more-params, already-registered.

OPER <name> <password>

Name: oper

Related: need-more-params, youre-oper, no-oper-host, password-mismatch.

MODE <name> <mode>

Name: mode

Related: need-more-params, key-set, no-chan-modes, chan-op-privs-needed, user-not-in-channel, unknown-mode, users-dont-match, user-mode-unknown-flag, channel-mode-is, ban-list, ban-list-end, except-list, except-list-end, invite-list, invite-list-end, uniq-op-is, user-mode-is.

FIXME multiples.

SERVICE <nickname> * <distribution> <int:type> 0 <info>

Name: service

Related: already-registered, need-more-params, erroneus-nickname, youre-service, your-host, my-info.

QUIT [message]

Name: quit

SQUIT <server> <comment>

Name: s-quit

Related: no-privileges, no-such-server, need-more-params.

3.2 Channel Operations

JOIN <#channels,> [keys,]

Name: channel-join

Related: need-more-params, banned-from-chan, invite-only-chan, bad-channel-key, channel-is-full, bad-chan-mask, no-such-channel, too-many-channels, too-many-targets, unavail-resource, topic-reply.

PART <#channels,> [message]

Name: channel-part

Related: need-more-params, no-such-channel, not-on-channel.

TOPIC <#channel> [topic]

Name: topic

Related: need-more-params, not-on-channel, no-topic-reply, topic-reply, chan-op-privs-needed, no-chan-modes.

NAMES [#channels,] [target]

Name: names

Related: no-such-server, names-reply, names-end.

LIST [#channels,] [target]

Name: list

Related: no-such-server, list-reply, list-end.

INVITE <nickname> <#channel>

Name: invite

Related: need-more-params, no-such-nick, not-on-channel, user-on-channel, chan-op-privs-needed, inviting, away-reply.

KICK <channels,> <users,> [comment]

Name: kick

Related: need-more-params, no-such-channel, bad-chan-mask, chan-op-privs-needed, user-not-in-channel, not-on-channel.

3.3 Sending Messages

PRIVMSG <target> <message>

Name: privmsg

Related: no-recipient, no-text-to-send, cant-send-to-chan, no-top-level, wild-top-level, too-many-targets, no-such-nick, away-reply.

NOTICE <target> <message>

Name: notice

Related: no-recipient, no-text-to-send, cant-send-to-chan, no-top-level, wild-top-level, too-many-targets, no-such-nick, away-reply.

3.4 MOTD Message

MOTD [target]

Name: motd

Related: motd-start, motd-text, motd-end, no-motd.

LUSERS [mask] [target]

Name: lusers

Related: luser-client, luser-op, luser-unknown, luser-channels, luser-me, no-such-server.

VERSION [target]

Name: version

Related: no-such-server, version-reply.

STATS [query] [target]

Name: stats

Related: no-such-server, stats-link-info, stats-uptime, stats-commands, stats-oline, stats-end.

Name: links

Arguments bind right-to-left.

Related: no-such-server, links-reply, links-end.

TIME [target]

Name: time

Related: no-such-server, time-reply.

CONNECT <target> <int:port> [remote]

Name: server-connect

Related: no-such-server, no-privileges, need-more-params.

TRACE [target]

Name: trace

Related: no-such-server, trace-link-reply, trace-connecting, trace-handshake, trace-unknown, trace-operator, trace-user, trace-server, trace-service, trace-newtype, trace-class, trace-log, trace-end.

ADMIN [target]

Name: admin

Related: no-such-server, admin-me, admin-loc1, admin-loc2, admin-email.

INFO [target]

Name: info

Related: no-such-server, info-reply, info-end.

3.5 Service Query and Commands

SERVLIST [mask] [type]

Name: serv-list

Related: serv-list-reply, serv-list-end.

SQUERY <servicename> <text>

Name: s-query

Related: no-recipient, no-text-to-send, cant-send-to-chan, no-top-level, wild-top-level, too-many-targets, no-such-nick, away-reply.

3.6 User Based Queries

WHO [mask] [flag(o):operators]

Name: who

Related: no-such-server, who-reply, who-end.

WHOIS [target] <masks,>

Name: who-is

Related: no-such-server, no-nickname-given, who-is-user, who-is-channels, who-is-server, away-reply, who-is-operator, who-is-idle, no-such-nick, who-is-end.

WHOWAS <nicknames,> [int:count] [target]

Name: who-was

Related: no-nickname-given, was-no-such-nick, who-was-user, who-is-server, who-was-end.

3.7 Miscellaneous Messages

KILL <nickname> <comment>

Name: kill

Related: no-privileges, need-more-params, no-such-nick, cant-kill-server.

PING <server1> [server2]

Name: ping

Related: no-origin, no-such-server.

PONG <server> [server2]

Name: pong

Related: no-origin, no-such-server.

ERROR <message>

Name: error

4 Optional Features

AWAY [text]

Name: away

Related: unaway-reply, now-away-reply.

REHASH

Name: rehash

Related: rehashing, no-privileges.

DIE

Name: die

Related: no-privileges.

RESTART

Name: restart

Related: no-privileges.

SUMMON <user> [target] [channel]

Name: summon

Related: no-recipient, file-error, no-login, no-such-server, summon-disabled, summoning.

USERS [target]

Name: users

Related: no-such-server, file-error, users-start, users-reply, no-users, users-end, users-disabled.

WALLOPS <message>

Name: wall-ops

Related: need-more-params.

USERHOST <nickname>

Name: user-host

Related: user-host-reply, need-more-params.

FIXME many nicknames.

ISON <nickname>

Name: is-on

Related: is-on-reply, need-more-params.

FIXME many nicknames.

5.1 Command Responses

001 <target> <message>

Name: welcome

002 <target> <message>

Name: your-host

003 <target> <message>

Name: created

004 <target> <message>

Name: my-info

005 <target> <message>

Name: bounce

Name: trace-link-reply

201 <target> Try. <class> <server>

Name: trace-connecting

202 <target> H.S. <class> <server>

Name: trace-handshake

203 <target> ???? <class> [ip]

Name: trace-unknown

204 <target> Oper <class> <nickname>

Name: trace-operator

205 <target> User <class> <nickname>

Name: trace-user

206 <target> Serv <class> <s> <c> <server> <hostmask> <protocol-version>

Name: trace-server

207 <target> Service <class> <name> <type> <active-type>

Name: trace-service

208 <target> <newtype> 0 <name>

Name: trace-newtype

209 <target> Class <class> <int:count>

Name: trace-class

Name: stats-link-info

212 <target> <command> <int:count> <int:bytes> <int:remote-count>

Name: stats-commands

219 <target> <letter> :End of STATS report

Name: stats-end

221 <target> <mode>

Name: user-mode-is

234 <target> <name> <server> <mask> <type> <int:hopcount> <info>

Name: serv-list-reply

235 <target> <mask> <type> :End of service listing

Name: serv-list-end

242 <target> <message>

Name: stats-uptime

243 <target> O <hostmask> * <name>

Name: stats-oline

251 <target> <message>

Name: luser-client

252 <target> <int:count> :operator(s) online

Name: luser-op

253 <target> <int:count> :unknown connection(s)

Name: luser-unknown

254 <target> <int:count> :channels formed

Name: luser-channels

255 <target> <message>

Name: luser-me

256 <target> <server> :Administrative info

Name: admin-me

257 <target> <message>

Name: admin-loc1

258 <target> <message>

Name: admin-loc2

259 <target> <email>

Name: admin-email

261 <target> File <logfile> <debug-level>

Name: trace-log

262 <target> <server> <version> :End of TRACE

Name: trace-end

263 <target> <command> :Please wait a while and try again.

Name: try-again

301 <target> <nickname> <message>

Name: away-reply

302 <target> <message>

Name: user-host-reply

FIXME parse data!

303 <target> <message>

Name: is-on-reply

FIXME parse data!

305 <target> :You are no longer marked as being away

Name: unaway-reply

306 <target> :You have been marked as being away

Name: now-away-reply

311 <target> <nickname> <user> <host> * <realname>

Name: who-is-user

312 <target> <nickname> <server> <info>

Name: who-is-server

313 <target> <nickname> :is an IRC operator

Name: who-is-operator

314 <target> <nickname> <user> <host> * <realname>

Name: who-was-user

315 <target> <name> :End of WHO list

Name: who-end

317 <target> <nickname> <int:time> :seconds idle

Name: who-is-idle

318 <target> <nickname> :End of WHOIS list

Name: who-is-end

319 <target> <nickname> <#channels>

Name: who-is-channels

322 <target> <#channel> <int:visible> <topic>

Name: list-reply

323 <target> :End of LIST

Name: list-end

324 <target> <#channel> <mode> <params>

Name: channel-mode-is

325 <target> <#channel> <nickname>

Name: uniq-op-is

331 <target> <#channel> :No topic is set

Name: no-topic-reply

332 <target> <#channel> <topic>

Name: topic-reply

341 <target> <#channel> <nick>

Name: inviting

342 <target> <user> :Summoning user to IRC

Name: summoning

346 <target> <#channel> <mask>

Name: invite-list

347 <target> <#channel> :End of channel invite list

Name: invite-list-end

348 <target> <#channel> <mask>

Name: except-list

349 <target> <#channel> :End of channel exception list

Name: except-list-end

351 <target> <version> <server> <comments>

Name: version-reply

352 <target> <#channel> <user> <host> <server> <nickname> <props> <realname>

Name: who-reply

353 <target> <mode> <#channel> <nicknames_>

Name: names-reply

Name: links-reply

Name: links-end

366 <target> <#channel> :End of NAMES list

Name: names-end

367 <target> <#channel> <mask>

Name: ban-list

368 <target> <#channel> :End of channel ban list

Name: ban-list-end

369 <target> <nickname> :End of WHOWAS

Name: who-was-end

371 <target> <info>

Name: info-reply

372 <target> <message>

Name: motd-text

374 <target> :End of INFO list

Name: info-end

375 <target> <message>

Name: motd-start

376 <target> :End of MOTD command

Name: motd-end

381 <target> :You are now an IRC operator

Name: youre-oper

382 <target> <file> Rehashing

Name: rehashing

383 <target> <message>

Name: youre-service

391 <target> <server> <time>

Name: time-reply

392 <target> :UserID Terminal Host

Name: users-start

393 <target> <message>

Name: users-reply

394 <target> :End of users

Name: users-end

395 <target> :Nobody logged in

Name: no-users

5.2 Error Replies

401 <target> <nickname> :No such nick/channel

Name: no-such-nick

402 <target> <server> :No such server

Name: no-such-server

403 <target> <#channel> :No such channel

Name: no-such-channel

404 <target> <#channel> :Cannot send to channel

Name: cant-send-to-chan

405 <target> <#channel> :You have joined too many channels

Name: too-many-channels

406 <target> <nickname> :There was no such nickname

Name: was-no-such-nick

407 <target> <orig-target> <message>

Name: too-many-targets

408 <target> <name> :No such service

Name: no-such-service

409 <target> :No origin specified

Name: no-origin

411 <target> :No recipient given

Name: no-recipient

412 <target> :No text to send

Name: no-text-to-send

413 <target> <mask> :No toplevel domain specified

Name: no-top-level

414 <target> <mask> :Wildcard in toplevel domain

Name: wild-top-level

415 <target> <mask> :Bad Server/host mask

Name: bad-mask

421 <target> <command> :Unknown command

Name: unknown-command

422 <target> :MOTD File is missing

Name: no-motd

423 <target> <server> :No administrative info available

Name: no-admin-info

424 <target> <message>

Name: file-error

431 <target> :No nickname given

Name: no-nickname-given

432 <target> <nickname> :Erroneous nickname

Name: erroneus-nickname

433 <target> <nickname> :Nickname is already in use

Name: nickname-in-use

436 <target> <nickname> <message>

Name: nick-collision

437 <target> <name> :Nick/channel is temporarily unavailable

Name: unavail-resource

441 <target> <nickname> <#channel> :They aren't on that channel

Name: user-not-in-channel

442 <target> <#channel> :You're not on that channel

Name: not-on-channel

443 <target> <user> <#channel> :is already on channel

Name: user-on-channel

444 <target> <user> :User not logged in

Name: no-login

445 <target> :SUMMON has been disabled

Name: summon-disabled

446 <target> :USERS has been disabled

Name: users-disabled

451 <target> :You have not registered

Name: not-registered

461 <target> <command> :Not enough parameters

Name: need-more-params

462 <target> :Unauthorized command (already registered)

Name: already-registered

463 <target> :Your host isn't among the privileged

Name: no-perm-for-host

464 <target> :Password incorrect

Name: password-mismatch

465 <target> :You are banned from this server

Name: youre-banned-creep

466 <target>

Name: you-will-be-banned

467 <target> <#channel> :Channel key already set

Name: key-set

471 <target> <#channel> :Cannot join channel (+l)

Name: channel-is-full

472 <target> <char> :is unknown mode char to me

Name: unknown-mode

473 <target> <#channel> :Cannot join channel (+i)

Name: invite-only-chan

474 <target> <#channel> :Cannot join channel (+b)

Name: banned-from-chan

475 <target> <#channel> :Cannot join channel (+k)

Name: bad-channel-key

476 <target> <#channel> :Bad Channel Mask

Name: bad-chan-mask

477 <target> <#channel> :Channel doesn't support modes

Name: no-chan-modes

478 <target> <#channel> <char> :Channel list is full

Name: ban-list-full

481 <target> :Permission Denied- You're not an IRC operator

Name: no-privileges

482 <target> <#channel> :You're not channel operator

Name: chan-op-privs-needed

483 <target> :You can't kill a server!

Name: cant-kill-server

484 <target> :Your connection is restricted!

Name: restricted

485 <target> :You're not the original channel operator

Name: uniq-op-privs-needed

491 <target> :No O-lines for your host

Name: no-oper-host

501 <target> :Unknown MODE flag

Name: user-mode-unknown-flag

502 <target> :Cannot change mode for other users

Name: users-dont-match