-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathcommand-types.ts
192 lines (161 loc) · 3.89 KB
/
command-types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
export enum IRCReplies {
// The server sends Replies 001 to 004 to a user upon successful registration.
/**
* "Welcome to the Internet Relay Network `<nick>`!`<user>`@`<host>`"
*/
RPL_WELCOME = '001',
/**
* "Your host is `<servername>`, running version `<ver>`"
*/
RPL_YOURHOST = '002',
/**
* "This server was created `<date>`"
*/
RPL_CREATED = '003',
/**
* "`<servername>` `<version>` `<available user modes>`
* `<available channel modes>`"
*/
RPL_MYINFO = '004',
/**
* Sent by the server to a user to suggest an alternative server.
* This is often used when the connection is refused
* because the server is already full.
*
* "Try server `<server name>`, port `<port number>`"
*/
RPL_BOUNCE = '005',
/**
* Parameters: `<msgtarget> <text>`
*/
NOTICE = 'NOTICE',
/**
* Parameters: `<server1> [ <server2> ]`
* @example PING tolsun.oulu.fi // Command to send a PING message to server
* PING WiZ tolsun.oulu.fi // Command from WiZ to send a PING message to server "tolsun.oulu.fi"
* PING :irc.funet.fi // Ping message sent by server "irc.funet.fi"
*/
PING = 'PING',
/**
* Parameters: `<server> [ <server2> ]`
* @example PONG csd.bu.edu tolsun.oulu.fi // PONG message from csd.bu.edu to tolsun.oulu.fi
*/
PONG = 'PONG',
/**
* "`<channel>` :Cannot join channel (+b)"
*/
ERR_BANNEDFROMCHAN = '474',
/**
* "`<channel>` :Cannot join channel (+i)"
*/
ERR_INVITEONLYCHAN = '473',
/**
* "`<channel>` :Cannot join channel (+k)"
*/
ERR_BADCHANNELKEY = '475',
/**
* "`<channel>` :Cannot join channel (+l)"
*/
ERR_CHANNELISFULL = '471',
/**
* "`<channel>` :Bad Channel Mask"
*/
ERR_BADCHANMASK = '476',
/**
* "`<channel name>` :No such channel"
*/
ERR_NOSUCHCHANNEL = '403',
/**
* "`<channel>` :You're not on that channel"
*/
ERR_NOTONCHANNEL = '442',
/**
* "`<channel name>` :You have joined too many channels"
*/
ERR_TOOMANYCHANNELS = '405',
/**
* "`<target>` :`<error code>` recipients. `<abort message>`"
*/
ERR_TOOMANYTARGETS = '407',
/**
* "`<nick/channel>` :Nick/channel is temporarily unavailable"
*/
ERR_UNAVAILRESOURCE = '437',
/**
* "`<channel>` :No topic is set"
*/
RPL_NOTOPIC = '331',
/**
* "`<channel>` :`<topic>`"
*/
RPL_TOPIC = '332',
/**
* When a user sends a JOIN message and if it is successful,
* the server will send a JOIN message as confirmation.
*/
JOIN = 'JOIN',
/**
* When the user sends a PART message and if it is successful,
* the server will send a PART message as confirmation.
*/
PART = 'PART',
/**
* "( "=" / "*" / "@" ) `<channel>`
* :[ "@" / "+" ] `<nick>` *( " " [ "@" / "+" ] `<nick>` )"
*
* "@" is used for secret channels,
* "*" for private channels,
* and "=" for others (public channels).
*/
RPL_NAMREPLY = '353',
/**
* "`<channel>` :End of NAMES list"
*/
RPL_ENDOFNAMES = '366',
/**
* When the user sends a NICK request,
* the server responds back with a NICK response.
*/
NICK = 'NICK',
/**
* ":No nickname given"
*/
ERR_NONICKNAMEGIVEN = '431',
/**
* "`<nick>` :Erroneous nickname"
*/
ERR_ERRONEUSNICKNAME = '432',
/**
* "`<nick>` :Nickname is already in use"
*/
ERR_NICKNAMEINUSE = '433',
/**
* "`<nick>` :Nickname collision KILL from `<user>`@`<host>`"
*/
ERR_NICKCOLLISION = '436',
PRIVMSG = 'PRIVMSG',
/**
* ":No recipient given (`<command>`)"
*/
ERR_NORECIPIENT = '411',
/**
* ":No text to send"
*/
ERR_NOTEXTTOSEND = '412',
/**
* "`<channel name>` :Cannot send to channel"
*/
ERR_CANNOTSENDTOCHAN = '404',
/**
* "`<mask>` :No toplevel domain specified"
*/
ERR_NOTOPLEVEL = '413',
/**
* "`<mask>` :Wildcard in toplevel domain"
*/
ERR_WILDTOPLEVEL = '414',
/**
* "`<nick>` :<away message>"
*/
RPL_AWAY = '301'
}