@sockethub/platform-irc 4.0.0-alpha.4 → 4.0.0-alpha.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,96 +1,91 @@
1
- # sockethub-platform-irc
1
+ # @sockethub/platform-irc
2
2
 
3
- A sockethub platform module implementing IRC functionality.
3
+ A Sockethub platform module implementing IRC (Internet Relay Chat) functionality.
4
4
 
5
5
  ## About
6
6
 
7
- This module contains all of the implementation details of an IRC client and is
8
- used as a sockethub platform.
7
+ This platform provides IRC client functionality, allowing web applications to connect to
8
+ IRC servers, join channels, send messages, and handle IRC events through ActivityStreams
9
+ messages.
9
10
 
10
- ## Implemented (`@type`)
11
- <kbd>![completed](http://sockethub.org/res/img/checkmark.png) send</kbd>
12
- <kbd>![completed](http://sockethub.org/res/img/checkmark.png) join</kbd>
13
- <kbd>![completed](http://sockethub.org/res/img/checkmark.png) leave</kbd>
14
- <kbd>![completed](http://sockethub.org/res/img/checkmark.png) observe</kbd>
15
- <kbd>![completed](http://sockethub.org/res/img/checkmark.png) update</kbd>
11
+ ## Implemented Verbs (`@type`)
16
12
 
17
- ## Example
13
+ * **send** - Send messages to channels or users
14
+ * **join** - Join IRC channels
15
+ * **leave** - Leave IRC channels
16
+ * **observe** - Monitor channel activity and user events
17
+ * **update** - Update user information (nick, etc.)
18
18
 
19
- Each sockethub platform uses JSON Activity Streams 2.0 which are received from and sent to clients, through the Sockethub service.
19
+ ## Usage
20
20
 
21
- ### Incoming
22
- Connected to IRC
21
+ ### Send Message Example
23
22
 
24
23
  ```json
25
24
  {
26
- "@type": "announce",
25
+ "@type": "send",
27
26
  "context": "irc",
28
27
  "actor": {
29
- "@id": "irc.freenode.net",
30
- "@type": "service"
28
+ "@id": "mynick@irc.libera.chat"
31
29
  },
32
- "published": "2015-05-20T22:32:06.212Z",
33
30
  "target": {
34
- "@id": "foobar@irc.freenode.net",
35
- "@type": "person",
36
- "displayName": "Foobar McUser"
31
+ "@id": "#general@irc.libera.chat"
37
32
  },
38
33
  "object": {
39
- "@type": "content",
40
- "content": {
41
- "network":{
42
- "name":"freenode",
43
- "hostname":"orwell.freenode.net",
44
- "ircd":"ircd-seven-1.1.3",
45
- "nicklength":16,
46
- "maxtargets":{
47
- "NAMES":1,
48
- "LIST":1,
49
- "KICK":1,
50
- "WHOIS":1,
51
- "PRIVMSG":4,
52
- "NOTICE":4,
53
- "ACCEPT":0,
54
- "MONITOR":0
55
- }
56
- },
57
- "channel":{
58
- "idlength":{
59
-
60
- },
61
- "limit":{
62
- "#":120
63
- },
64
- "length":50,
65
- "modes":4,
66
- "types":"#",
67
- "kicklength":0,
68
- "topiclength":390
69
- },
70
- "modes":{
71
- "user":"DOQRSZaghilopswz",
72
- "channel":"CFILMPQSbcefgijklmnopqrstvz",
73
- "param":"bkloveqjfI",
74
- "types":{
75
- "a":"eIbq",
76
- "b":"kov",
77
- "c":"flj",
78
- "d":"CFLMPQScgimnprstz"
79
- },
80
- "prefixes":"@+",
81
- "prefixmodes":{
82
- "o":"@",
83
- "v":"+"
84
- },
85
- "maxlist":{
86
- "bqeI":100
87
- }
88
- }
89
- }
34
+ "@type": "Note",
35
+ "content": "Hello IRC channel!"
90
36
  }
91
37
  }
92
38
  ```
93
39
 
40
+ ### Join Channel Example
41
+
42
+ ```json
43
+ {
44
+ "@type": "join",
45
+ "context": "irc",
46
+ "actor": {
47
+ "@id": "mynick@irc.libera.chat"
48
+ },
49
+ "target": {
50
+ "@id": "#general@irc.libera.chat"
51
+ }
52
+ }
53
+ ```
54
+
55
+ ### Private Message Example
56
+
57
+ ```json
58
+ {
59
+ "@type": "send",
60
+ "context": "irc",
61
+ "actor": {
62
+ "@id": "mynick@irc.libera.chat"
63
+ },
64
+ "target": {
65
+ "@id": "friend@irc.libera.chat"
66
+ },
67
+ "object": {
68
+ "@type": "Note",
69
+ "content": "Hello friend!"
70
+ }
71
+ }
72
+ ```
73
+
74
+ ## Features
75
+
76
+ * **Channel communication**: Join and participate in IRC channels
77
+ * **Private messaging**: Send direct messages to other users
78
+ * **User management**: Handle nick changes and user information
79
+ * **Network support**: Connect to various IRC networks
80
+ * **Event handling**: Process IRC events and convert to ActivityStreams
81
+
82
+ ## Use Cases
83
+
84
+ * **Web IRC clients**: Build browser-based IRC chat applications
85
+ * **Chatbots**: Create IRC bots that integrate with web services
86
+ * **Notification systems**: Send alerts to IRC channels
87
+ * **Community integration**: Connect web platforms to IRC communities
88
+
94
89
  ## API
95
90
 
96
- API docs can be found [here](API.md)
91
+ Detailed API documentation can be found [here](API.md)