|
@@ -172,9 +172,7 @@ commands that KtIrc supports can be invoked using the `send*` methods,
|
172
|
172
|
which are documented in the <<Messages>> reference. Other useful methods
|
173
|
173
|
such as `reply` can be found in the <<Utility methods>> reference.
|
174
|
174
|
|
175
|
|
-== Reference
|
176
|
|
-
|
177
|
|
-=== IrcClient DSL
|
|
175
|
+== IrcClient DSL
|
178
|
176
|
|
179
|
177
|
The DSL for creating a new `IrcClient` allows you to set a number of
|
180
|
178
|
options relating to how KtIrc connects, what user details it provides,
|
|
@@ -208,7 +206,7 @@ sasl {
|
208
|
206
|
}
|
209
|
207
|
----
|
210
|
208
|
|
211
|
|
-==== Server settings
|
|
209
|
+=== Server settings
|
212
|
210
|
|
213
|
211
|
The server block allows you to specify the details of the IRC server you
|
214
|
212
|
wish to connect to:
|
|
@@ -235,7 +233,7 @@ server(useTls = true, port = 6697) {
|
235
|
233
|
}
|
236
|
234
|
----
|
237
|
235
|
|
238
|
|
-==== User profile
|
|
236
|
+=== User profile
|
239
|
237
|
|
240
|
238
|
The user profile controls how KtIrc will present itself to the IRC server, and
|
241
|
239
|
how other users on that server will see the KtIrc user:
|
|
@@ -261,7 +259,7 @@ As with the <<Server settings>> you can use a more compact syntax:
|
261
|
259
|
profile("nickname", "username", "real name")
|
262
|
260
|
----
|
263
|
261
|
|
264
|
|
-==== Behaviour
|
|
262
|
+=== Behaviour
|
265
|
263
|
|
266
|
264
|
The behaviour block allows you to tweak how KtIrc itself operates. These
|
267
|
265
|
options allow you perform common operations automatically, or enjoy more
|
|
@@ -276,7 +274,7 @@ advanced IRC features even if the server doesn't support them:
|
276
|
274
|
|
277
|
275
|
The behaviour block is optional in its entirety.
|
278
|
276
|
|
279
|
|
-==== SASL configuration
|
|
277
|
+=== SASL configuration
|
280
|
278
|
|
281
|
279
|
SASL ("Simple Authentication and Security Layer") is a standard mechanism
|
282
|
280
|
for securely authenticating to a service that has recently been adopted
|
|
@@ -360,14 +358,14 @@ sasl {
|
360
|
358
|
|
361
|
359
|
The SASL block is optional in its entirety.
|
362
|
360
|
|
363
|
|
-=== State
|
|
361
|
+== State
|
364
|
362
|
|
365
|
363
|
KtIrc attempts to track all reasonable state of the IRC network. This includes
|
366
|
364
|
details about the server, channels the client is joined to, and users that are
|
367
|
365
|
also in those channels. The state is exposed in a several fields accessible
|
368
|
366
|
from the `IrcClient`:
|
369
|
367
|
|
370
|
|
-==== ServerState
|
|
368
|
+=== ServerState
|
371
|
369
|
|
372
|
370
|
The server state provides information about the server, and our connection to
|
373
|
371
|
it.
|
|
@@ -423,7 +421,7 @@ getModes("@+") == "ov"
|
423
|
421
|
Contains the types of channels that are allowed by the server, such as
|
424
|
422
|
`\#&` for normal channels ("#") and local channels ("&").
|
425
|
423
|
|
426
|
|
-===== Capabilities
|
|
424
|
+==== Capabilities
|
427
|
425
|
|
428
|
426
|
The IRCv3 specifications introduce the concept of 'capability negotiation'.
|
429
|
427
|
This allows the client and server to negotiate and enable new capabilities
|
|
@@ -454,7 +452,7 @@ translations.
|
454
|
452
|
Contains a map of capabilities that KtIrc has successfully negotiated with
|
455
|
453
|
the server.
|
456
|
454
|
|
457
|
|
-====== Supported capabilities
|
|
455
|
+===== Supported capabilities
|
458
|
456
|
|
459
|
457
|
* `sasl` - used to perform SASL authentication during connection
|
460
|
458
|
* `message-tags` - allows arbitrary tags on messages
|
|
@@ -471,7 +469,7 @@ the server.
|
471
|
469
|
* `away-notify` - the server sends a message when a user's away state changes
|
472
|
470
|
* `chghost` - the server sends a message when a user's host changes
|
473
|
471
|
|
474
|
|
-===== Features
|
|
472
|
+==== Features
|
475
|
473
|
|
476
|
474
|
Features are KtIrc's way of exposing the information the server declares in
|
477
|
475
|
its ISUPPORT messages. These describe how the server is configured, and what
|
|
@@ -503,7 +501,7 @@ the value of the feature will be `null` (such as for those identified as
|
503
|
501
|
`Int?` or `String?` types).
|
504
|
502
|
====
|
505
|
503
|
|
506
|
|
-==== UserState
|
|
504
|
+=== UserState
|
507
|
505
|
|
508
|
506
|
The client's UserState object tracks the details of all users in common
|
509
|
507
|
channels. It can be used to find the most up-to-date and comprehensive
|
|
@@ -544,7 +542,7 @@ ircClient.userState["acidBurn"]?.let { knownUser -> <1>
|
544
|
542
|
<3> Returns all common channels we share with the user; will never
|
545
|
543
|
include channels that the KtIrc client is not joined to.
|
546
|
544
|
|
547
|
|
-==== ChannelState
|
|
545
|
+=== ChannelState
|
548
|
546
|
|
549
|
547
|
The ChannelState keeps track of the state for all channels that the client
|
550
|
548
|
is joined to. It is indexed by channel name:
|
|
@@ -570,7 +568,7 @@ Each channel's state contains the following properties:
|
570
|
568
|
* `modes` - A map of the current channel modes and their values. Only
|
571
|
569
|
complete if `modesDiscovered` is true.
|
572
|
570
|
|
573
|
|
-===== Channel users
|
|
571
|
+==== Channel users
|
574
|
572
|
|
575
|
573
|
Channel users are accessed using the `users` property, which provides an
|
576
|
574
|
iterable map of nickname to `ChannelUser`. Each `ChannelUser` contains
|
|
@@ -585,7 +583,7 @@ ircClient.channelState["#ktirc"]?.users?.forEach { user ->
|
585
|
583
|
}
|
586
|
584
|
----
|
587
|
585
|
|
588
|
|
-=== Events
|
|
586
|
+== Events
|
589
|
587
|
|
590
|
588
|
Incoming lines from the IRC server are covered by KtIrc to subclasses of
|
591
|
589
|
`IrcEvent`. These, along with other more advance events, are then published
|
|
@@ -658,9 +656,9 @@ properties:
|
658
|
656
|
All the properties are nullable, and most events will only populate
|
659
|
657
|
one of the three.
|
660
|
658
|
|
661
|
|
-==== Server events
|
|
659
|
+=== Server events
|
662
|
660
|
|
663
|
|
-===== ServerConnecting
|
|
661
|
+==== ServerConnecting
|
664
|
662
|
* Type: IrcEvent
|
665
|
663
|
* Properties: _(none)_
|
666
|
664
|
|
|
@@ -668,7 +666,7 @@ This event is raised by KtIrc as soon as it starts attempting to connect to
|
668
|
666
|
a server. It will be followed by either a <<ServerConnected>> or a
|
669
|
667
|
<<ServerConnectionError>> event at some point.
|
670
|
668
|
|
671
|
|
-===== ServerConnected
|
|
669
|
+==== ServerConnected
|
672
|
670
|
* Type: IrcEvent
|
673
|
671
|
* Properties: _(none)_
|
674
|
672
|
|
|
@@ -677,7 +675,7 @@ starting the process of registering, negotiating capabilities, etc.
|
677
|
675
|
The server will *not* yet be ready for use - a <<ServerReady>> event will
|
678
|
676
|
follow once all of the initial setup has completed.
|
679
|
677
|
|
680
|
|
-===== ServerConnectionError
|
|
678
|
+==== ServerConnectionError
|
681
|
679
|
* Type: IrcEvent
|
682
|
680
|
* Properties:
|
683
|
681
|
** `error`: `ConnectionError` - the type of error that occurred
|
|
@@ -697,7 +695,7 @@ the error, if known:
|
697
|
695
|
|
698
|
696
|
This event will be followed by a <<ServerDisconnected>> event.
|
699
|
697
|
|
700
|
|
-===== ServerWelcome
|
|
698
|
+==== ServerWelcome
|
701
|
699
|
* Type: IrcEvent
|
702
|
700
|
* Properties:
|
703
|
701
|
** `server`: `String` - the name the server supplied for itself
|
|
@@ -710,7 +708,7 @@ message. It contains the name that the server supplied for itself
|
710
|
708
|
identifies itself as `node3.uk.irc.example.com`), and the nickname
|
711
|
709
|
that the server says we are using.
|
712
|
710
|
|
713
|
|
-===== ServerFeaturesUpdated
|
|
711
|
+==== ServerFeaturesUpdated
|
714
|
712
|
* Type: IrcEvent
|
715
|
713
|
* Properties:
|
716
|
714
|
** `serverFeatures`: `ServerFeatureMap` - the features supplied by the server
|
|
@@ -722,7 +720,7 @@ split over multiple lines.
|
722
|
720
|
In general, you should wait for a <<ServerReady>> event and then query the
|
723
|
721
|
<<Features>> instead of relying on this event.
|
724
|
722
|
|
725
|
|
-===== ServerReady
|
|
723
|
+==== ServerReady
|
726
|
724
|
* Type: IrcEvent
|
727
|
725
|
* Properties: _(none)_
|
728
|
726
|
|
|
@@ -733,7 +731,7 @@ initial data describing its configurations and its features.
|
733
|
731
|
At this point it is safe to start issuing commands, checking
|
734
|
732
|
state, joining channels, etc.
|
735
|
733
|
|
736
|
|
-===== PingReceived
|
|
734
|
+==== PingReceived
|
737
|
735
|
* Type: IrcEvent
|
738
|
736
|
* Properties:
|
739
|
737
|
** `nonce`: `ByteArray` - the unique data that must be included in the reply
|
|
@@ -741,157 +739,156 @@ state, joining channels, etc.
|
741
|
739
|
Raised when the IRC server sends a PING message to the client. KtIrc will
|
742
|
740
|
automatically reply with an appropriate PONG.
|
743
|
741
|
|
744
|
|
-===== ServerCapabilitiesReceived
|
|
742
|
+==== ServerCapabilitiesReceived
|
745
|
743
|
|
746
|
744
|
TODO
|
747
|
745
|
|
748
|
|
-===== ServerCapabilitiesAcknowledged
|
|
746
|
+==== ServerCapabilitiesAcknowledged
|
749
|
747
|
|
750
|
748
|
TODO
|
751
|
749
|
|
752
|
|
-===== ServerCapabilitiesFinished
|
|
750
|
+==== ServerCapabilitiesFinished
|
753
|
751
|
|
754
|
752
|
TODO
|
755
|
753
|
|
756
|
|
-===== MotdLineReceived
|
|
754
|
+==== MotdLineReceived
|
757
|
755
|
|
758
|
756
|
TODO
|
759
|
757
|
|
760
|
|
-===== MotdFinished
|
|
758
|
+==== MotdFinished
|
761
|
759
|
|
762
|
760
|
TODO
|
763
|
761
|
|
764
|
|
-==== Channel events
|
|
762
|
+=== Channel events
|
765
|
763
|
|
766
|
|
-===== ChannelJoined
|
|
764
|
+==== ChannelJoined
|
767
|
765
|
|
768
|
766
|
TODO
|
769
|
767
|
|
770
|
|
-===== ChannelJoinFailed
|
|
768
|
+==== ChannelJoinFailed
|
771
|
769
|
|
772
|
770
|
TODO
|
773
|
771
|
|
774
|
|
-===== ChannelParted
|
|
772
|
+==== ChannelParted
|
775
|
773
|
|
776
|
774
|
TODO
|
777
|
775
|
|
778
|
|
-===== ChannelUserKicked
|
|
776
|
+==== ChannelUserKicked
|
779
|
777
|
|
780
|
778
|
TODO
|
781
|
779
|
|
782
|
|
-===== ChannelQuit
|
|
780
|
+==== ChannelQuit
|
783
|
781
|
|
784
|
782
|
TODO
|
785
|
783
|
|
786
|
|
-===== ChannelNickChanged
|
|
784
|
+==== ChannelNickChanged
|
787
|
785
|
|
788
|
786
|
TODO
|
789
|
787
|
|
790
|
|
-===== ChannelNamesReceived
|
|
788
|
+==== ChannelNamesReceived
|
791
|
789
|
|
792
|
790
|
TODO
|
793
|
791
|
|
794
|
|
-===== ChannelNamesFinished
|
|
792
|
+==== ChannelNamesFinished
|
795
|
793
|
|
796
|
794
|
TODO
|
797
|
795
|
|
798
|
|
-===== ChannelTopicDiscovered
|
|
796
|
+==== ChannelTopicDiscovered
|
799
|
797
|
|
800
|
798
|
TODO
|
801
|
799
|
|
802
|
|
-===== ChannelTopicMetadataDiscovered
|
|
800
|
+==== ChannelTopicMetadataDiscovered
|
803
|
801
|
|
804
|
802
|
TODO
|
805
|
803
|
|
806
|
|
-===== ChannelTopicChanged
|
|
804
|
+==== ChannelTopicChanged
|
807
|
805
|
|
808
|
806
|
TODO
|
809
|
807
|
|
810
|
808
|
|
811
|
|
-==== Channel/User events
|
|
809
|
+=== Channel/User events
|
812
|
810
|
|
813
|
811
|
TODO
|
814
|
812
|
|
815
|
|
-===== MessageReceived
|
|
813
|
+==== MessageReceived
|
816
|
814
|
|
817
|
815
|
TODO
|
818
|
816
|
|
819
|
|
-===== NoticeReceived
|
|
817
|
+==== NoticeReceived
|
820
|
818
|
|
821
|
819
|
TODO
|
822
|
820
|
|
823
|
|
-===== ActionReceived
|
|
821
|
+==== ActionReceived
|
824
|
822
|
|
825
|
823
|
TODO
|
826
|
824
|
|
827
|
|
-===== CtcpReceived
|
|
825
|
+==== CtcpReceived
|
828
|
826
|
|
829
|
827
|
TODO
|
830
|
828
|
|
831
|
|
-===== CtcpReplyReceived
|
|
829
|
+==== CtcpReplyReceived
|
832
|
830
|
|
833
|
831
|
TODO
|
834
|
832
|
|
835
|
|
-===== UserQuit
|
|
833
|
+==== UserQuit
|
836
|
834
|
|
837
|
835
|
TODO
|
838
|
836
|
|
839
|
|
-===== UserNickChanged
|
|
837
|
+==== UserNickChanged
|
840
|
838
|
|
841
|
839
|
TODO
|
842
|
840
|
|
843
|
|
-===== UserHostChanged
|
|
841
|
+==== UserHostChanged
|
844
|
842
|
|
845
|
843
|
TODO
|
846
|
844
|
|
847
|
|
-===== UserAccountChanged
|
|
845
|
+==== UserAccountChanged
|
848
|
846
|
|
849
|
847
|
TODO
|
850
|
848
|
|
851
|
|
-===== ModeChanged
|
|
849
|
+==== ModeChanged
|
852
|
850
|
|
853
|
851
|
TODO
|
854
|
852
|
|
855
|
853
|
|
856
|
|
-==== Other events
|
|
854
|
+=== Other events
|
857
|
855
|
|
858
|
|
-===== AuthenticationMessage
|
|
856
|
+==== AuthenticationMessage
|
859
|
857
|
|
860
|
858
|
TODO
|
861
|
859
|
|
862
|
|
-===== SaslFinished
|
|
860
|
+==== SaslFinished
|
863
|
861
|
|
864
|
862
|
TODO
|
865
|
863
|
|
866
|
|
-===== SaslMechanismNotAvailableError
|
|
864
|
+==== SaslMechanismNotAvailableError
|
867
|
865
|
|
868
|
866
|
TODO
|
869
|
867
|
|
870
|
|
-===== BatchStarted
|
|
868
|
+==== BatchStarted
|
871
|
869
|
|
872
|
870
|
TODO
|
873
|
871
|
|
874
|
|
-===== BatchFinished
|
|
872
|
+==== BatchFinished
|
875
|
873
|
|
876
|
874
|
TODO
|
877
|
875
|
|
878
|
|
-===== BatchReceived
|
|
876
|
+==== BatchReceived
|
879
|
877
|
|
880
|
878
|
TODO
|
881
|
879
|
|
882
|
|
-===== NicknameChangeFailed
|
|
880
|
+==== NicknameChangeFailed
|
883
|
881
|
|
884
|
882
|
TODO
|
885
|
883
|
|
886
|
|
-
|
887
|
|
-=== Messages
|
|
884
|
+== Messages
|
888
|
885
|
|
889
|
886
|
TODO
|
890
|
887
|
|
891
|
|
-=== Utility methods
|
|
888
|
+== Utility methods
|
892
|
889
|
|
893
|
890
|
TODO
|
894
|
891
|
|
895
|
|
-=== IRCv3 support
|
|
892
|
+== IRCv3 support
|
896
|
893
|
|
897
|
894
|
TODO
|