You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.adoc 43KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302
  1. = KtIrc {version}
  2. Chris Smith
  3. :version: 0.11.0
  4. :toc: left
  5. :toc-position: left
  6. :toclevels: 5
  7. == About KtIrc
  8. KtIrc is a Kotlin JVM library for connecting to and interacting with IRC servers.
  9. It is still in an early stage of development. Its main features:
  10. .Built for Kotlin
  11. KtIrc is written in and designed for use in Kotlin; it uses extension methods,
  12. DSLs, sealed classes, and so on, to make it much easier to use than an
  13. equivalent Java library.
  14. .Coroutine-powered
  15. KtIrc uses co-routines for all of its input/output which lets it deal with
  16. IRC messages in the background while your app does other things, without
  17. the overhead of creating a new thread per IRC client.
  18. .Modern IRC standards
  19. KtIrc supports many IRCv3 features such as SASL authentication, message IDs,
  20. server timestamps, replies, reactions, account tags, and more. These features
  21. (where server support is available) make it easier to develop bots and
  22. clients, and enhance IRC with new user-facing functionality.
  23. == Getting started
  24. === Installing
  25. All you need to do to start using KtIrc is add a single dependency.
  26. KtIrc is published to JCenter, making it quick and easy to pull in
  27. to almost any project. The examples below show how to add the JCenter
  28. repository and then the KtIrc dependency; you may already be using
  29. JCenter for other dependencies -- in that case just skip the
  30. repository configuration!
  31. [TIP]
  32. ====
  33. KtIrc adheres to semantic versioning: you can expect to upgrade between
  34. minor versions without problems (e.g. from `0.1.2` to `0.13.7`); major
  35. version changes may include breaking changes such as the removal of
  36. deprecated methods. You should check the changelog before updating to
  37. a new major version.
  38. ====
  39. .Gradle (using Kotlin DSL)
  40. [source,kotlin,subs="attributes"]
  41. ----
  42. repositories {
  43. jcenter()
  44. }
  45. dependencies {
  46. implementation("com.dmdirc:ktirc:{version}")
  47. }
  48. ----
  49. .Gradle (using Groovy DSL)
  50. [source,groovy,subs="attributes"]
  51. ----
  52. buildscript {
  53. repositories {
  54. jcenter()
  55. }
  56. }
  57. implementation 'com.dmdirc:ktirc:{version}'
  58. ----
  59. .Maven
  60. [source,xml,subs="attributes"]
  61. ----
  62. <repositories>
  63. <repository>
  64. <id>jcenter</id>
  65. <url>https://jcenter.bintray.com</url>
  66. </repository>
  67. </repositories>
  68. <dependencies>
  69. <dependency>
  70. <groupId>com.dmdirc</groupId>
  71. <artifactId>ktirc</artifactId>
  72. <version>{version}</version>
  73. </dependency>
  74. </dependencies>
  75. ----
  76. === Creating your first client
  77. KtIrc provides a DSL ("domain specific language") for configuring a
  78. client that allows you to set the connection details, the user's
  79. details, and configure the behaviour of KtIrc itself. The DSL is
  80. accessed through the `IrcClient` function. For full details of all
  81. supported options, see the <<IrcClient DSL>> reference.
  82. A basic client will look like this:
  83. [source,kotlin]
  84. ----
  85. val client = IrcClient {
  86. server {
  87. host = "my.server.com"
  88. }
  89. profile {
  90. nickname = "nick"
  91. username = "username"
  92. realName = "Hi there"
  93. }
  94. }
  95. ----
  96. === Connecting and handling events
  97. Getting KtIrc to start connecting is as simple as calling the `connect()`
  98. method, but before that we probably want to add an event listener to deal
  99. with incoming messages:
  100. [source,kotlin]
  101. ----
  102. client.onEvent { event -> <1>
  103. when (event) { <2>
  104. is ServerReady ->
  105. client.sendJoin("#ktirc") <3>
  106. is ServerDisconnected ->
  107. client.connect()
  108. is MessageReceived ->
  109. if (event.message == "!test") <4>
  110. client.reply(event, "Test successful!") <5>
  111. }
  112. }
  113. client.connect() <6>
  114. ----
  115. <1> An event listener is registered using the `onEvent` method. It receives
  116. a single IrcEvent.
  117. <2> A Kotlin `when` statement provides a convenient way to switch on the
  118. type of event received.
  119. <3> Most common IRC commands have `send` methods defined to quickly and
  120. safely send the message with the right formatting.
  121. <4> Kotlin smart-casts the event, so you can access the properties specific
  122. to the matched event class, such as `message`.
  123. <5> The IrcClient class provides useful methods to react and respond to
  124. events.
  125. <6> The connect() method starts connecting and returns immediately. You'll
  126. receive events updating you on the progress.
  127. In this example, we're waiting for three events: `ServerReady`, which occurs
  128. after we have connected and the server has sent us all of the pre-amble
  129. such as its configuration and capabilities; `ServerDisconnected` which
  130. is raised whenever KtIrc gets disconnected from (or fails to connect to) the
  131. IRC server; and `MessageReceived` which occurs, unsuprisingly, whenever a
  132. message is received. KtIrc has many events: for more information, see the
  133. <<Events>> reference.
  134. [CAUTION]
  135. ====
  136. With this code, KtIrc will immediately try to reconnect as soon as it is
  137. disconnected. If the server closes the connection early (due to, for
  138. example, a bad password or the user being banned) this will result in a
  139. huge number of connection attempts in a short time. In real code you should
  140. always delay reconnections -- preferably with a backoff -- to avoid
  141. excessive connection attempts.
  142. ====
  143. You can see that KtIrc provides a number of useful methods for sending
  144. requests to the server, and reacting and responding to events. IRC
  145. commands that KtIrc supports can be invoked using the `send*` methods,
  146. which are documented in the <<Messages>> reference. Other useful methods
  147. such as `reply` can be found in the <<Utility methods>> reference.
  148. === Mandatory event handling
  149. In order to properly connect to IRC, stay connected, and handle
  150. incoming messages properly, the following events MUST be handled:
  151. .<<NicknameChangeRequired>>
  152. The nickname change required event occurs when connecting to a server
  153. if our initial nickname is taken. A new nickname must be supplied
  154. to continue connecting.
  155. .<<ServerDisconnected>>
  156. When KtIrc becomes disconnected from a server, or fails a connection
  157. attempt, it will raise this event. If you wish to stay connected
  158. to IRC you must call the `connect()` method to start a reconnection
  159. attempt after an appropriate delay.
  160. .<<BatchReceived>>
  161. On servers that support the IRCv3 batch capability, some incoming
  162. messages may be sent inside a batch. These could include join or
  163. quit messages during a netsplit, or other important messages you
  164. may need to process. At minimum, when receiving a BatchReceived
  165. event you should apply your normal processing to all the events
  166. contained within.
  167. == IrcClient DSL
  168. The DSL for creating a new `IrcClient` allows you to set a number of
  169. options relating to how KtIrc connects, what user details it provides,
  170. and how it behaves. The full range of options available in the DSL is
  171. shown below:
  172. [source,kotlin]
  173. ----
  174. server {
  175. host = "irc.example.com"
  176. port = 6667
  177. useTls = true
  178. password = "H4ckTh3Pl4n3t"
  179. }
  180. profile {
  181. nickname = "MyBot"
  182. username = "bot"
  183. realName = "Botomatic v1.2"
  184. }
  185. behaviour {
  186. requestModesOnJoin = true
  187. alwaysEchoMessages = true
  188. }
  189. sasl {
  190. mechanisms += "PLAIN"
  191. username = "botaccount"
  192. password = "s3cur3"
  193. }
  194. ----
  195. === Server settings
  196. The server block allows you to specify the details of the IRC server you
  197. wish to connect to:
  198. * `host` - the hostname or IP address of the server *(required)*
  199. * `port` - the port to connect on _(default: 6667)_
  200. * `useTls` - whether to use a secure connection or not _(default: false)_
  201. * `password` - the password to provide to the server _(default: null)_
  202. An alternative more compact syntax is available for configuring server details:
  203. [source,kotlin]
  204. ----
  205. server("irc.example.com", 6667, true, "H4ckTh3Pl4n3t")
  206. ----
  207. You can, if you wish, combine the two or use named parameters:
  208. [source,kotlin]
  209. ----
  210. server(useTls = true, port = 6697) {
  211. host = "irc.example.com"
  212. password = "H4ckTh3Pl4n3t"
  213. }
  214. ----
  215. === User profile
  216. The user profile controls how KtIrc will present itself to the IRC server, and
  217. how other users on that server will see the KtIrc user:
  218. * `nickname` - the initial nickname you wish to use *(required)*
  219. * `username` - the "username" to provide to the server _(default: KtIrc)_
  220. * `realName` - the "real name" that will be seen by other clients
  221. _(default: KtIrc User)_
  222. [TIP]
  223. ====
  224. The "username" is sometimes called the "ident" or "gecos". Some IRC servers
  225. will check for an ident reply from your host and use that in place of the
  226. username provided if it gets a response. The username (or ident reply)
  227. becomes part of your client's hostmask, and is visible to other users. It
  228. is unrelated to nickserv or other account usernames.
  229. ====
  230. As with the <<Server settings>> you can use a more compact syntax:
  231. [source,kotlin]
  232. ----
  233. profile("nickname", "username", "real name")
  234. ----
  235. === Behaviour
  236. The behaviour block allows you to tweak how KtIrc itself operates. These
  237. options allow you perform common operations automatically, or enjoy more
  238. advanced IRC features even if the server doesn't support them:
  239. * `requestModesOnJoin` - if enabled, automatically requests channel modes
  240. when the client joins a new channel _(default: false)_
  241. * `alwaysEchoMessages` - if enabled, every message you send will result
  242. in a `MessageReceived` event being returned. Servers that support the
  243. IRCv3 `echo-message` capability will do this automatically; enabling the
  244. behaviour will make all servers act the same way _(default: false)_
  245. The behaviour block is optional in its entirety.
  246. === SASL configuration
  247. SASL ("Simple Authentication and Security Layer") is a standard mechanism
  248. for securely authenticating to a service that has recently been adopted
  249. for use in IRC. SASL supports a number of 'mechanisms' that describe how
  250. the data will be exchanged between the client and server. KtIrc supports
  251. the following mechanisms:
  252. * `EXTERNAL` - the server uses some external means to authenticate the
  253. client, instead of a username and password. On most servers this
  254. means checking the client certificate against one registered with
  255. the user's account. _(disabled by default)_
  256. * `PLAIN` - the client sends the username and password in plain text
  257. during the connection phase. This offers slightly more security
  258. than calling `nickserv identify` (for example) after connecting.
  259. * `SCRAM-SHA-1` - this mechanism involves a "salted challenge" being
  260. completed which results in both the server and the client proving that
  261. they know the user's password, but without it every being transmitted.
  262. This is based on the `SHA-1` algorithm which has known issues, but is
  263. more than sufficient when used in this manner.
  264. * `SCRAM-SHA-256` - the same as `SCRAM-SHA-1` but using the `SHA-256`
  265. algorithm instead, which is more modern and secure.
  266. To use `PLAIN`, `SCRAM-SHA-1` or `SCRAM-SHA-256`, you must supply a username
  267. and password in the configuration:
  268. [source,kotlin]
  269. ----
  270. sasl {
  271. username = "botaccount"
  272. password = "s3cur3"
  273. }
  274. ----
  275. KtIrc enables `SCRAM-SHA-256`, `SCRAM-SHA-1` and `PLAIN` by default, and will
  276. use them in that order of preference if the server supports more than one.
  277. You can modify the `mechanisms` parameter if you wish to disable one:
  278. [source,kotlin]
  279. ----
  280. sasl {
  281. mechanisms -= "PLAIN"
  282. username = "botaccount"
  283. password = "s3cur3"
  284. }
  285. ----
  286. You can also clear all the default mechanisms and provide your own list:
  287. [source,kotlin]
  288. ----
  289. sasl {
  290. mechanisms("SCRAM-SHA-256", "PLAIN")
  291. username = "botaccount"
  292. password = "s3cur3"
  293. }
  294. ----
  295. If you wish to enable the `EXTERNAL` mechanism, you do not need to provide
  296. a username or password:
  297. [source,kotlin]
  298. ----
  299. sasl {
  300. mechanisms("EXTERNAL")
  301. }
  302. ----
  303. Alternatively, if you wish to enable `EXTERNAL` but fall back to other
  304. mechanisms if it doesn't work:
  305. [source,kotlin]
  306. ----
  307. sasl {
  308. mechanisms += "EXTERNAL"
  309. username = "botaccount"
  310. password = "s3cur3"
  311. }
  312. ----
  313. The SASL block is optional in its entirety.
  314. == State
  315. KtIrc attempts to track all reasonable state of the IRC network. This includes
  316. details about the server, channels the client is joined to, and users that are
  317. also in those channels. The state is exposed in a several fields accessible
  318. from the `IrcClient`:
  319. === ServerState
  320. The server state provides information about the server, and our connection to
  321. it.
  322. [IMPORTANT]
  323. ====
  324. The server state will be updated frequently while KtIrc is connecting to a
  325. server. The values within it should not be relied upon until a `ServerReady`
  326. event is received, as they may be incomplete or estimates before then.
  327. ====
  328. .serverState.status (ServerStatus)
  329. Provides an enum containing the current server state. One of:
  330. * `Disconnected` - the server is not connected
  331. * `Connecting` - we are attempting to establish a connection
  332. * `Negotiating` - we are logging in, negotiating capabilities, etc
  333. * `Ready` - we are connected and commands may be sent
  334. .serverState.localNickname (String)
  335. The current nickname we are using on the IRC server. While connecting this
  336. will default to the nickname from the <<User profile>>, but it may be updated
  337. if e.g. the nick is in use or not allowed.
  338. .serverState.serverName (String)
  339. The name the server uses for itself. While connecting this defaults to the
  340. hostname given in the <<Server settings>>, but it will be updated to the
  341. value provided by the server. For example, you may connect to
  342. `irc.example.com` and during the negotiation phase KtIrc will see that it
  343. is actually talking to `server3.uk.irc.example.com` and update the
  344. serverName to reflect that.
  345. [TIP]
  346. ====
  347. For a user-friendly identifier most servers provide a `NETWORK` token in
  348. the ISUPPORT reply, which is available via the <<Features>> property.
  349. ====
  350. .serverState.channelModePrefix (ModePrefixMapping)
  351. Provides a mapping from channel user modes (such as "o" for op, "v" for
  352. voice) to the prefixes used before nicknames (such as "@" and "+").
  353. To map prefixes to modes, you can use the `getMode()` or `getModes()`
  354. functions:
  355. [source,kotlin]
  356. ----
  357. getMode('@') == 'o'
  358. getModes("@+") == "ov"
  359. ----
  360. .serverState.channelTypes (String)
  361. Contains the types of channels that are allowed by the server, such as
  362. `\#&amp;` for normal channels ("#") and local channels ("&").
  363. ==== Capabilities
  364. The IRCv3 specifications introduce the concept of 'capability negotiation'.
  365. This allows the client and server to negotiate and enable new capabilities
  366. that are mutually supported.
  367. The capabilities state contains the following properties:
  368. .serverState.capabilities.negotiationState (CapabilitiesNegotiationState)
  369. The current state of negotiating with the server. One of:
  370. * `AWAITING_LIST` - we have requested a list of capabitilies and are awaiting
  371. a reply
  372. * `AWAITING_ACK` - we have sent the capabilities we want to enable, and are
  373. waitin for the server to acknowledge them
  374. * `AUTHENTICATING` - we are attempting to authenticate with SASL
  375. * `FINISHED` - we have completed negotiation
  376. Where a server does not support IRCv3 capability negotiation, the state will
  377. remain at `AWAITING_LIST`.
  378. .serverState.capabilities.advertisedCapabilities (Map<String, String>)
  379. Contains a map of capability names to values that the server offered. This
  380. should only be required for advance use cases, such as looking up the
  381. languages offered by a server when providing the user with a choice of
  382. translations.
  383. .serverState.capabilities.enabledCapabilities (Map<Capability, String>)
  384. Contains a map of capabilities that KtIrc has successfully negotiated with
  385. the server.
  386. ===== Supported capabilities
  387. * `sasl` - used to perform SASL authentication during connection
  388. * `message-tags` - allows arbitrary tags on messages
  389. * `server-time` - the server adds a timestamp tag to each incoming message
  390. * `account-tag` - the server adds an account tag to incoming user messages
  391. * `userhost-in-names` - the NAMES reply includes users hosts not just nicknames
  392. * `multi-prefix` - all modes are included in nick prefixes (e.g. `@+nick`)
  393. * `extended-join` - more information is sent when a user joins a channel
  394. * `batch` - allows multi-line responses to be batched together
  395. * `echo-message` - echos the client's own messages back to it
  396. * `draft/labeled-responses` - responses are labeled so the client knows which
  397. incoming message corresponds to which command it sent
  398. * `account-notify` - the server sends a message when a user's account changes
  399. * `away-notify` - the server sends a message when a user's away state changes
  400. * `chghost` - the server sends a message when a user's host changes
  401. ==== Features
  402. Features are KtIrc's way of exposing the information the server declares in
  403. its ISUPPORT messages. These describe how the server is configured, and what
  404. limits are placed on clients. You access features using the `features` map
  405. in the server state:
  406. [source,kotlin]
  407. ----
  408. ircClient.serverState.features[ServerFeature.Network]
  409. ----
  410. The following features are available:
  411. * `Network` - the name of the network the server belongs to __(String?)__
  412. * `ServerCaseMapping` - the current case mapping of the server __(CaseMapping!)__
  413. * `Modeprefixes` - the user mode prefix mapping (e.g. ov to @+) __(ModePrefixMapping!)__
  414. * `MaximumChannels` - the maximum number of channels a user can join __(Int?)__
  415. * `ChannelModes` - the modes supported in channels __(Array<String>?)__
  416. * `ChannelTypes` - the types of channel supported (e.g. "#&") __(String!)__
  417. * `MaximumChannelNameLength` - how long channel names may be __(Int!)__
  418. * `WhoxSupport` - whether the server supports extended whos ("WHOX") __(Boolean!)__
  419. [NOTE]
  420. ====
  421. If the server does not define a feature, KtIrc will either fall back to a
  422. default value based on the IRC RFCs or common practice (for those features
  423. identified with a non-null type such as `Int!` or `String!`); otherwise
  424. the value of the feature will be `null` (such as for those identified as
  425. `Int?` or `String?` types).
  426. ====
  427. === UserState
  428. The client's UserState object tracks the details of all users in common
  429. channels. It can be used to find the most up-to-date and comprehensive
  430. information for those users, as well as the set of channels that we share
  431. with them.
  432. The UserState is accessed via the `userState` property of IrcClient and
  433. acts as a map, accessible using either a nickname or a `User` object:
  434. [source,kotlin]
  435. ----
  436. ircClient.userState["acidBurn"]
  437. val user: User = myIrcEvent.user
  438. ircClient.userState[user]
  439. ----
  440. The UserState returns a `KnownUser` object which exposes a `details`
  441. property containing the user details, and a `channels` property
  442. containing the common channel names. You can also use the `in`
  443. operator to check if the user is in a channel:
  444. [source,kotlin]
  445. ----
  446. ircClient.userState["acidBurn"]?.let { knownUser -> <1>
  447. val accountName = knownUser.account
  448. val inChannel = "#channel" in knownUser <2>
  449. val allChannels = knownUser.channels <3>
  450. }
  451. ----
  452. <1> If the user isn't known, the call to `get` (using the `[]` operator)
  453. returns null, so we use a `let` statement to deal only with the case
  454. that the user is found.
  455. <2> Check if the user is present on the common channel `#channel`. If
  456. the KtIrc client is not joined to that channel, it will always return
  457. false. You can also use the `contains("#channel")` method instead of
  458. the `in` operator.
  459. <3> Returns all common channels we share with the user; will never
  460. include channels that the KtIrc client is not joined to.
  461. === ChannelState
  462. The ChannelState keeps track of the state for all channels that the client
  463. is joined to. It is indexed by channel name:
  464. [source,kotlin]
  465. ----
  466. ircClient.channelState["#ktirc"]
  467. ----
  468. Each channel's state contains the following properties:
  469. * `receivingUserList` - boolean value indicating whether we are in the process
  470. of receiving the list of users for the channel. If we are, the `users`
  471. property will be incomplete.
  472. * `modesDiscovered` - boolean value indicating whether we have received the
  473. full set of modes set on the channel. The `requestModesOnJoin` <<Behaviour>>
  474. allows you to make KtIrc request these automatically.
  475. * `topic` - a ChannelTopic object representing the current channel topic.
  476. If no topic is set, then a ChannelTopic with `null` properties will be
  477. provided.
  478. * `users` - a map of all known users in the channel, see <<Channel users>>
  479. for more information
  480. * `modes` - A map of the current channel modes and their values. Only
  481. complete if `modesDiscovered` is true.
  482. ==== Channel users
  483. Channel users are accessed using the `users` property, which provides an
  484. iterable map of nickname to `ChannelUser`. Each `ChannelUser` contains
  485. the nickname and current modes for that user. To get further details about
  486. a user, such as their hostmask or real name, you should query the <<UserState>>
  487. with the given nickname.
  488. [source,kotlin]
  489. ----
  490. ircClient.channelState["#ktirc"]?.users?.forEach { user ->
  491. println("${user.nickname} has modes ${user.modes}")
  492. }
  493. ----
  494. == Events
  495. Incoming lines from the IRC server are converted by KtIrc to subclasses of
  496. `IrcEvent`. These, along with other more advance events, are then published
  497. to users of the client using the `onEvent` method in `IrcClient`.
  498. All events extend `IrcEvent`, which offers a single `metadata` property.
  499. This contains details related to the event:
  500. * `time` - the time at which the message occurred (if the server supports
  501. the `server-time` capability), or the time at which we received it.
  502. Always present.
  503. * `batchId` - an opaque string identifier for the batch the message is
  504. part of (if the server supports the `batch` capability). Null for
  505. messages not in a batch.
  506. * `messageId` - a unique, opaque string identifier for the message if
  507. the server supports the `msgid` tag. Null otherwise.
  508. * `label` - a unique, opaque string identifier that ties a message to
  509. a labelled command that was sent by KtIrc, if the server supports
  510. the `labelled-replies` capability. Null otherwise.
  511. Several specialised versions of `IrcEvent` are used which allow for easier
  512. processing:
  513. .TargetedEvent
  514. A `TargetedEvent` is one that is targeted at either a user or a channel.
  515. `TargetedEvent` exposes a string `target` property that identifies the
  516. target of the message. This allows you to direct messages to the right
  517. handler or UI component more easily:
  518. [source,kotlin]
  519. ----
  520. ircClient.onEvent { event ->
  521. when (event) {
  522. is TargetedEvent -> dispatchEvent(event.target, event)
  523. }
  524. }
  525. ----
  526. .SourcedEvent
  527. A large number of events come from a remote IRC user, and it can be
  528. useful to handle these in the same way. KtIrc offers a `SourcedEvent`
  529. interface for all events that originate from a user, and it exposes
  530. a single `user` property:
  531. [source,kotlin]
  532. ----
  533. ircClient.onEvent { event ->
  534. when (event) {
  535. is SourcedEvent -> notifyAboutUserActivity(event.user)
  536. }
  537. }
  538. ----
  539. .ChannelMembershipAdjustment
  540. A number of events describe how the membership of a channel changes --
  541. namely, joins, parts, quits, kicks, names replies, and nick changes.
  542. All of these events implement the `ChannelMembershipAdjustment` interface
  543. which reduces the amount of logic you need to do if you wish to maintain
  544. a membership list (for example in a UI). The interface exposes three
  545. properties:
  546. * `addedUser` - a single nickname to be added _(String)_
  547. * `removedUser` - a single nickname to be removed _(String)_
  548. * `replacedUsers` - a list of nicknames to replace any existing ones with
  549. _(Array<String>)_
  550. All the properties are nullable, and most events will only populate
  551. one of the three.
  552. === Server events
  553. ==== ServerConnecting
  554. * Type: IrcEvent
  555. * Properties: _(none)_
  556. This event is raised by KtIrc as soon as it starts attempting to connect to
  557. a server. It will be followed by either a <<ServerConnected>> or a
  558. <<ServerConnectionError>> event at some point.
  559. ==== ServerConnected
  560. * Type: IrcEvent
  561. * Properties: _(none)_
  562. This event is raised by KtIrc when it has connected to the server, and is
  563. starting the process of registering, negotiating capabilities, etc.
  564. The server will *not* yet be ready for use - a <<ServerReady>> event will
  565. follow once all of the initial setup has completed.
  566. ==== ServerConnectionError
  567. * Type: IrcEvent
  568. * Properties:
  569. ** `error`: `ConnectionError` - the type of error that occurred
  570. ** `details`: `String?` - information about the error, if available
  571. This event is raised by KtIrc when a problem occurred while connecting
  572. to the server. The `ConnectionError` enum will provide the cause of
  573. the error, if known:
  574. * `UnresolvableAddress` - the hostname provided could not be resolved
  575. to an IP address
  576. * `ConnectionRefused` - the server did not answer a connection request
  577. on the given port
  578. * `BadTlsCertificate` - there was an issue with the TLS certificate the
  579. server presented (e.g. it was out of date, for the wrong domain, etc)
  580. * `Unknown` - the exact cause of the error isn't known
  581. This event will be followed by a <<ServerDisconnected>> event.
  582. ==== ServerWelcome
  583. * Type: IrcEvent
  584. * Properties:
  585. ** `server`: `String` - the name the server supplied for itself
  586. ** `localNick`: `String` - the nickname the server says we are using
  587. This event is raised in response to the server sending a 001 WELCOME
  588. message. It contains the name that the server supplied for itself
  589. (for example, KtIrc may connect to a round-robin address like
  590. `irc.example.com` and the server it actually connects to then
  591. identifies itself as `node3.uk.irc.example.com`), and the nickname
  592. that the server says we are using.
  593. ==== ServerReady
  594. * Type: IrcEvent
  595. * Properties: _(none)_
  596. This event is raised by KtIrc when it has connected to a server,
  597. registered with the IRC network, and received all of the server's
  598. initial data describing its configurations and its features.
  599. At this point it is safe to start issuing commands, checking
  600. state, joining channels, etc.
  601. ==== ServerDisconnected
  602. * Type: IrcEvent
  603. * Properties: _(none)_
  604. Raised in all cases where KtIrc has attempted to connect to an IRC server and
  605. has now been disconnected. KtIrc will not automatically attempt to reconnect;
  606. the `connect()` method should be called again after an appropriate delay.
  607. NOTE: All of KtIrc's internal state, such as details about users and
  608. channels, will be reset when disconnected from the server. State should not
  609. be queried until a new <<ServerReady>> event has been received, at which
  610. point it will have been recreated.
  611. ==== MotdLineReceived
  612. * Type: IrcEvent
  613. * Properties:
  614. ** `line`: `String` - the line of the message of the day that was received
  615. ** `first`: `Boolean` - true if the line is the first one received
  616. The MotdLineReceived event is raised whenever the server sends a single
  617. line of its Message of the Day. The `first` parameter is set on the
  618. first line of the MOTD so that special formatting or UI handling can
  619. be applied. When the MOTD is finished, a <<MotdFinished>> event is raised.
  620. ==== MotdFinished
  621. * Type: IrcEvent
  622. * Properties:
  623. ** `missing`: `Boolean` - indicates the MOTD was missing
  624. This event occurs in two circumstances: when the server has sent a
  625. series of <<MotdLineReceived>> events and has reached the end of the
  626. Message of the Day; or when the server has no MOTD to send and
  627. informs the client that the MOTD is missing.
  628. === Channel events
  629. NOTE: Many events such as <<MessageReceived>> apply to both channels and
  630. users. These are documented in the <<Channel/User events>> category.
  631. ==== ChannelJoined
  632. * Type: IrcEvent, TargetedEvent, SourcedEvent, ChannelMembershipAdjustment
  633. * Properties:
  634. ** `user`: `User` - the user that joined the channel
  635. ** `target`: `String` - the channel that was joined
  636. Raised whenever a user joins a channel, including the KtIrc client. You
  637. can determine whether the join applies to another user or the local client
  638. using the <<IsLocalClient>> utility method.
  639. When the local client joins a new channel, this event will typically be
  640. followed by one or more <<ChannelNamesReceived>> events, then
  641. <<ChannelNamesFinished>>, <<ChannelTopicDiscovered>> and if the
  642. `requestModesOnJoin` <<Behaviour>> is enabled a <<ModeChanged>> event.
  643. ==== ChannelJoinFailed
  644. * Type: IrcEvent, TargetedEvent
  645. * Properties:
  646. ** `target`: `String` - the channel that we tried to join
  647. ** `reason`: `JoinError` - the error that prevented us from joining
  648. The ChannelJoinFailed event is raised when we attempt to join a channel
  649. but the server doesn't allow us to do so. The reason parameter enumerates
  650. the possible problems:
  651. * `TooManyChannels` - we are already in the maximum number of channels allowed
  652. by the server.
  653. * `NoHiding` - the channel is no-hiding (+H), but we have invisible join/parts
  654. enabled.
  655. * `NeedKey` - the channel is keyed (+k) and a valid key was not provided
  656. * `NeedInvite` - the channel is invite only (+i) and no invite was received.
  657. * `NeedRegisteredNick` - the channel is limited to registered users only, and we
  658. are not registered.
  659. * `NeedTls` - the channel is secure-only, and we're not using TLS.
  660. * `NeedAdmin` - the channel is limited to server admins and we are not one.
  661. * `NeedOper` - the channel is limited to ircops and we are not one.
  662. * `Banned` - we are banned from the channel.
  663. * `ChannelFull` - the channel is limited (+l) and currently full.
  664. * `BadChannelName` - the channel name is disallowed by the server.
  665. * `Throttled` - we're trying to joiin too many channels and have been throttled.
  666. * `Unknown` - we don't know why.
  667. [WARNING]
  668. ====
  669. ChannelJoinFailed events are generated on a _best-effort_ basis by KtIrc. Error
  670. handling on IRC is very poorly standardised, and varies wildly between server
  671. implementations. For example, trying to join a secure-only channel on an
  672. ircd-seven server will send a NOTICE to the user instead of an error response,
  673. so no `ChannelJoinFailed` event will be raised.
  674. When tracking whether a join suceeded or failed you should combine monitoring
  675. for the response with a reasonable timeout, and assume failure if the timeout
  676. lapses without a <<ChannelJoined>> or <<ChannelJoinFailed>> event occurring.
  677. ====
  678. ==== ChannelParted
  679. * Type: IrcEvent, TargetedEvent, SourcedEvent, ChannelMembershipAdjustment
  680. * Properties:
  681. ** `user`: `User` - the user that parted the channel
  682. ** `target`: `String` - the channel that was parted
  683. ** `reason`: `String` - the user-supplied reason for parting
  684. Raised when any user parts a channel that we are on. Users can supply a reason
  685. when parting a channel; if they have done so the `reason` property will be
  686. non-empty.
  687. ==== ChannelUserKicked
  688. * Type: IrcEvent, TargetedEvent, SourcedEvent, ChannelMembershipAdjustment
  689. * Properties:
  690. ** `user`: `User` - the user that performed the kick
  691. ** `victim`: `String` - the nickname of the user that was kicked
  692. ** `target`: `String` - the channel that the victim was kicked from
  693. ** `reason`: `String` - the user-supplied reason for kicking
  694. This event occurs when a user is kicked (forcibly removed) from a channel.
  695. NOTE: The `user` is the one performing the kick, and will remain in the
  696. channel. The `victim` is the one being forcibly ejected.
  697. ==== ChannelQuit
  698. * Type: IrcEvent, TargetedEvent, SourcedEvent, ChannelMembershipAdjustment
  699. * Properties:
  700. ** `user`: `User` - the user that quit
  701. ** `target`: `String` - the channel that the user was in
  702. ** `reason`: `String` - the user-supplied reason for quitting
  703. After a <<UserQuit>> event, KtIrc will "fan out" the event to all of the
  704. channels that we share with the user and raise a `ChannelQuit` event for
  705. each channel. This is designed to make implementing certain features easier;
  706. if you fully handle a UserQuit event there is no need to also handle the
  707. ChannelQuit events, and vice-versa.
  708. Users and servers can supply a reason when a user quits; if supplied then
  709. the `reason` parameter will be non-empty.
  710. ==== ChannelNickChanged
  711. * Type: IrcEvent, TargetedEvent, SourcedEvent, ChannelMembershipAdjustment
  712. * Properties:
  713. ** `user`: `User` - the user who has changed their nickname
  714. ** `target`: `String` - the channel that the user is in
  715. ** `newNick`: `String` - the user's new nickname
  716. After a <<UserNickChanged>> event, KtIrc will "fan out" the event to
  717. all of the channels that we share with the user and raise a `ChannelNickChanged`
  718. event for each channel. This is designed to make implementing certain features
  719. easier; if you fully handle a UserNickChanged event there is no need to also
  720. handle the ChannelNickChanged events, and vice-versa.
  721. TIP: The user property will contain the user's old details, but you will
  722. not be able to access additional information from the <<UserState>> using
  723. these details as KtIrc will have internally renamed the user to use the
  724. new nickname.
  725. ==== ChannelNamesReceived
  726. * Type: IrcEvent, TargetedEvent
  727. * Properties:
  728. ** `target`: `String` - the channel that the user is in
  729. ** `names`: `List<String>` - the partial list of names that are in the channel
  730. When we join a channel (or manually request it) the IRC server sends the
  731. list of channel members in a sequence of NAMES messages. KtIrc raises a
  732. `ChannelNamesReceived` event for each of these messages.
  733. WARNING: The given names may not be a complete list of members of the channel,
  734. as more names could follow. The format of the names varies between IRC servers
  735. and depending on the IRCv3 <<Capabilities>> that KtIrc negotiated. Most
  736. implementations should simply wait for <<ChannelNamesFinished>> and then request
  737. the complete list of names from KtIrc's <<ChannelState>>.
  738. ==== ChannelNamesFinished
  739. * Type: IrcEvent, TargetedEvent, ChannelMembershipAdjustment
  740. * Properties:
  741. ** `target`: `String` - the channel whose names response has finished
  742. Raised when the IRC server has finished receiving all of the names of users
  743. that are currently in a channel. At this point you can query the channel's
  744. <<ChannelState>> to get a detailed list of members.
  745. ==== ChannelTopicDiscovered
  746. * Type: IrcEvent, TargetedEvent
  747. * Properties:
  748. ** `target`: `String` - the channel whose topic was discovered
  749. ** `topic`: `String?` - the topic in the channel, if any
  750. `ChannelTopicDiscovered` occurs when we join a channel (or manually request
  751. that the server repeats the current topic) and contains the current channel
  752. topic. If there is no topic set, the `topic` parameter will be `null`.
  753. Metadata about the topic, such as who set it and when, is contained in the
  754. <<ChannelTopicMetadataDiscovered>> event which should follow this one, if
  755. the topic was set.
  756. ==== ChannelTopicMetadataDiscovered
  757. * Type: IrcEvent, TargetedEvent
  758. * Properties:
  759. ** `target`: `String` - the channel whose topic metadata was discovered
  760. ** `user`: `User` - the user who set the topic
  761. ** `setTime`: `LocalDateTime` - the time at which the topic was set
  762. Provides meta-data relating to a topic that was previously set on the
  763. channel.
  764. NOTE: The given user may not exist on the network any more, or may have
  765. changed details since the topic was set. You should not expect to be able
  766. to look up the user's details in the <<UserState>>, or interact with them
  767. directly on IRC.
  768. ==== ChannelTopicChanged
  769. * Type: IrcEvent, TargetedEvent, SourcedEvent
  770. * Properties:
  771. ** `user`: `User` - the user who has changed the topic
  772. ** `target`: `String` - the channel that the topic was changed in
  773. ** `topic`: `String?` - the channel's new topic
  774. Raised when a user changes the topic of a channel we are joined to. If
  775. the topic was cleared/removed, the `topic` parameter will be `null`.
  776. === Channel/User events
  777. TODO
  778. ==== MessageReceived
  779. TODO
  780. ==== NoticeReceived
  781. TODO
  782. ==== ActionReceived
  783. TODO
  784. ==== CtcpReceived
  785. TODO
  786. ==== CtcpReplyReceived
  787. TODO
  788. ==== UserQuit
  789. TODO
  790. ==== UserNickChanged
  791. TODO
  792. ==== UserHostChanged
  793. TODO
  794. ==== UserAccountChanged
  795. TODO
  796. ==== ModeChanged
  797. TODO
  798. === Other events
  799. ==== PingReceived
  800. * Type: IrcEvent
  801. * Properties:
  802. ** `nonce`: `ByteArray` - the unique data that must be included in the reply
  803. Raised when the IRC server sends a PING message to the client. KtIrc will
  804. automatically reply with an appropriate PONG.
  805. ==== ServerFeaturesUpdated
  806. * Type: IrcEvent
  807. * Properties:
  808. ** `serverFeatures`: `ServerFeatureMap` - the features supplied by the server
  809. Corresponds to the server sending a single 005 ISUPPORT line. Multiple
  810. events of this type may be raised in quick succession when features are
  811. split over multiple lines.
  812. In general, you should wait for a <<ServerReady>> event and then query the
  813. <<Features>> instead of relying on this event.
  814. ==== ServerCapabilitiesReceived
  815. TODO
  816. ==== ServerCapabilitiesAcknowledged
  817. TODO
  818. ==== ServerCapabilitiesFinished
  819. TODO
  820. ==== AuthenticationMessage
  821. TODO
  822. ==== SaslFinished
  823. TODO
  824. ==== SaslMechanismNotAvailableError
  825. TODO
  826. ==== BatchStarted
  827. TODO
  828. ==== BatchFinished
  829. TODO
  830. ==== BatchReceived
  831. TODO
  832. ==== NicknameChangeFailed
  833. * Type: IrcEvent
  834. * Properties:
  835. ** `cause`: `NicknameChangeError` - the reason the nickname must be changed
  836. Raised when the server informs us that our desired nickname is not available
  837. for some reason. The `cause` parameter will contain a specific reason given
  838. by the server:
  839. * `ErroneousNickname` - the nickname is not allowed by the server (e.g. it used
  840. restricted characters)
  841. * `AlreadyInUse` - the nickname is already in use
  842. * `Collision` - the nickname has collided with another somehow
  843. * `NoNicknameGiven` - no nickname was provided
  844. ==== NicknameChangeRequired
  845. * Type: IrcEvent, NicknameChangeFailed
  846. * Properties:
  847. ** `cause`: `NicknameChangeError` - the reason the nickname must be changed
  848. Raised during a connection attempt when there is a problem with the nickname
  849. that KtIrc was told to use. The exact problem will be detailed in the `cause`
  850. parameter, and has the same options as the <<NicknameChangeFailed>> event.
  851. Upon receiving this event, a new nickname MUST be chosen and sent to the
  852. server with the <<sendNickChange>> method. Failure to do so will result
  853. in the IRC server terminating the connection.
  854. WARNING: `NicknameChangeRequired` currently extends `NicknameChangeFailed`
  855. for backwards compatibility. This will be removed in KtIrc 2.0.0, and
  856. both events will need to be handled separately.
  857. == Messages
  858. TODO
  859. === sendNickChange
  860. TODO
  861. == Utility methods
  862. TODO
  863. === IsLocalClient
  864. TODO
  865. === React
  866. TODO
  867. === Reply
  868. TODO
  869. == IRCv3 support
  870. The following table shows KtIrc's IRCv3 support as of this release:
  871. [cols=3,options="header,autowidth"]
  872. |===
  873. | Feature
  874. | Status
  875. | Notes
  876. 3+h| Capability negotiation
  877. | https://ircv3.net/specs/core/capability-negotiation.html[CAP]
  878. | {set:cellbgcolor:green} Supported
  879. | {set:cellbgcolor!}
  880. See <<Supported capabilities>> for the caps KtIrc will negotiate
  881. | https://ircv3.net/specs/core/capability-negotiation.html#cap-ls-version[CAP 302]
  882. | {set:cellbgcolor:green} Supported
  883. | {set:cellbgcolor!}
  884. See <<Supported capabilities>> for the caps KtIrc will negotiate
  885. | https://ircv3.net/specs/core/capability-negotiation.html#cap-notify[cap-notify]
  886. | {set:cellbgcolor:red} Not yet supported
  887. | {set:cellbgcolor!}
  888. 3+h| Published specifications
  889. | https://ircv3.net/specs/extensions/account-notify-3.1.html[account-notify] v3.1
  890. | {set:cellbgcolor:green} Supported
  891. | {set:cellbgcolor!}
  892. See <<UserAccountChanged>>
  893. | https://ircv3.net/specs/extensions/account-tag-3.2.html[account-tag] v3.2
  894. | {set:cellbgcolor:green} Supported
  895. | {set:cellbgcolor!}
  896. Accounts are automatically added to `User` properties in events
  897. | https://ircv3.net/specs/extensions/away-notify-3.1.html[away-notify] v3.1
  898. | {set:cellbgcolor:orange} Partial support
  899. | {set:cellbgcolor!}
  900. Negotiated but not yet exposed as an event
  901. | https://ircv3.net/specs/extensions/batch-3.2.html[batch] v3.2
  902. | {set:cellbgcolor:green} Supported
  903. | {set:cellbgcolor!}
  904. See <<BatchReceived>>
  905. | https://ircv3.net/specs/extensions/chghost-3.2.html[chghost] v3.2
  906. | {set:cellbgcolor:green} Supported
  907. | {set:cellbgcolor!}
  908. See <<UserHostChanged>>
  909. | https://ircv3.net/specs/extensions/echo-message-3.2.html[echo-message] v3.2
  910. | {set:cellbgcolor:green} Supported
  911. | {set:cellbgcolor!}
  912. See also the `alwaysEchoMessages` <<Behaviour>>
  913. | https://ircv3.net/specs/extensions/extended-join-3.1.html[extended-join] v3.1
  914. | {set:cellbgcolor:green} Supported
  915. | {set:cellbgcolor!}
  916. Additional details are automatically added to `User` properties in events
  917. | https://ircv3.net/specs/extensions/invite-notify-3.2.html[invite-notify] v3.2
  918. | {set:cellbgcolor:red} Not yet supported
  919. | {set:cellbgcolor!}
  920. | https://ircv3.net/specs/extensions/message-tags.html[message-tags]
  921. | {set:cellbgcolor:green} Supported
  922. | {set:cellbgcolor!}
  923. Exposed in the metadata property of <<Events>>
  924. | https://ircv3.net/specs/core/monitor-3.2.html[monitor]
  925. | {set:cellbgcolor:red} Not yet supported
  926. | {set:cellbgcolor!}
  927. | https://ircv3.net/specs/extensions/multi-prefix-3.1.html[multi-prefix] v3.1
  928. | {set:cellbgcolor:green} Supported
  929. | {set:cellbgcolor!}
  930. Automatically included in <<ChannelState>>
  931. | https://ircv3.net/specs/extensions/sasl-3.1.html[SASL] v3.1
  932. | {set:cellbgcolor:green} Supported
  933. | {set:cellbgcolor!}
  934. See <<SASL configuration>>
  935. | https://ircv3.net/specs/extensions/sasl-3.2.html[SASL] v3.2
  936. | {set:cellbgcolor:orange} Partial support
  937. | {set:cellbgcolor!}
  938. Notifications via `cap-notify` not yet supported. See <<SASL configuration>>
  939. | https://ircv3.net/specs/extensions/server-time-3.2.html[server-time] v3.2
  940. | {set:cellbgcolor:green} Supported
  941. | {set:cellbgcolor!}
  942. Exposed in the metadata property of <<Events>>
  943. | https://ircv3.net/specs/extensions/sts.html[sts]
  944. | {set:cellbgcolor:red} Not yet supported
  945. | {set:cellbgcolor!}
  946. | https://ircv3.net/specs/extensions/userhost-in-names-3.2.html[userhost-in-names] v3.2
  947. | {set:cellbgcolor:green} Supported
  948. | {set:cellbgcolor!}
  949. Automatically included in <<UserState>>
  950. | https://ircv3.net/specs/extensions/webirc.html[webirc]
  951. | {set:cellbgcolor:red} Not yet supported
  952. | {set:cellbgcolor!}
  953. 3+h| Draft specifications
  954. | https://github.com/ircv3/ircv3-specifications/pull/363[brb]
  955. | {set:cellbgcolor:red} Not yet supported
  956. | {set:cellbgcolor!}
  957. | https://github.com/ircv3/ircv3-specifications/pull/308[channel renaming]
  958. | {set:cellbgcolor:red} Not yet supported
  959. | {set:cellbgcolor!}
  960. | https://github.com/ircv3/ircv3-specifications/pull/349[chathistory]
  961. | {set:cellbgcolor:red} Not yet supported
  962. | {set:cellbgcolor!}
  963. | https://github.com/ircv3/ircv3-specifications/pull/346[delivered]
  964. | {set:cellbgcolor:red} Not yet supported
  965. | {set:cellbgcolor!}
  966. | https://github.com/ircv3/ircv3-specifications/pull/304[editmsg]
  967. | {set:cellbgcolor:red} Not yet supported
  968. | {set:cellbgcolor!}
  969. | https://ircv3.net/specs/extensions/labeled-response.html[labeled-response]
  970. | {set:cellbgcolor:green} Supported
  971. | {set:cellbgcolor!}
  972. Exposed in the metadata property of <<Events>>
  973. | https://ircv3.net/specs/extensions/message-ids.html[message-ids]
  974. | {set:cellbgcolor:red} Not yet supported
  975. | {set:cellbgcolor!}
  976. | https://github.com/ircv3/ircv3-specifications/pull/330[migrate]
  977. | {set:cellbgcolor:red} Not yet supported
  978. | {set:cellbgcolor!}
  979. | https://ircv3.net/specs/client-tags/react.html[react]
  980. | {set:cellbgcolor:orange} Partial support
  981. | {set:cellbgcolor!}
  982. Sending via <<React>> method, no events generated
  983. | https://github.com/ircv3/ircv3-specifications/pull/347[read]
  984. | {set:cellbgcolor:red} Not yet supported
  985. | {set:cellbgcolor!}
  986. | https://github.com/ircv3/ircv3-specifications/pull/276[register]
  987. | {set:cellbgcolor:red} Not yet supported
  988. | {set:cellbgcolor!}
  989. | https://ircv3.net/specs/client-tags/reply.html[reply]
  990. | {set:cellbgcolor:orange} Partial support
  991. | {set:cellbgcolor!}
  992. Sending via <<Reply>> method, not processed on incoming messages
  993. | https://github.com/ircv3/ircv3-specifications/pull/306[resume]
  994. | {set:cellbgcolor:red} Not yet supported
  995. | {set:cellbgcolor!}
  996. | https://github.com/ircv3/ircv3-specifications/pull/361[setname]
  997. | {set:cellbgcolor:red} Not yet supported
  998. | {set:cellbgcolor!}
  999. | https://github.com/ircv3/ircv3-specifications/pull/357[standard replies]
  1000. | {set:cellbgcolor:red} Not yet supported
  1001. | {set:cellbgcolor!}
  1002. | https://github.com/ircv3/ircv3-specifications/pull/348[typing]
  1003. | {set:cellbgcolor:red} Not yet supported
  1004. | {set:cellbgcolor!}
  1005. 3+^h|Vendor specifications
  1006. |===