cinch 1.1.3 → 2.0.0.pre.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (83) hide show
  1. data/LICENSE +1 -0
  2. data/README.md +3 -3
  3. data/docs/bot_options.md +435 -0
  4. data/docs/changes.md +440 -0
  5. data/docs/common_mistakes.md +35 -0
  6. data/docs/common_tasks.md +47 -0
  7. data/docs/encodings.md +67 -0
  8. data/docs/events.md +272 -0
  9. data/docs/logging.md +5 -0
  10. data/docs/migrating.md +267 -0
  11. data/docs/readme.md +18 -0
  12. data/examples/plugins/custom_prefix.rb +1 -1
  13. data/examples/plugins/dice_roll.rb +38 -0
  14. data/examples/plugins/lambdas.rb +1 -1
  15. data/examples/plugins/memo.rb +16 -10
  16. data/examples/plugins/url_shorten.rb +1 -0
  17. data/lib/cinch.rb +5 -60
  18. data/lib/cinch/ban.rb +13 -7
  19. data/lib/cinch/bot.rb +228 -403
  20. data/lib/cinch/{cache_manager.rb → cached_list.rb} +5 -1
  21. data/lib/cinch/callback.rb +3 -0
  22. data/lib/cinch/channel.rb +119 -195
  23. data/lib/cinch/{channel_manager.rb → channel_list.rb} +6 -3
  24. data/lib/cinch/configuration.rb +73 -0
  25. data/lib/cinch/configuration/bot.rb +47 -0
  26. data/lib/cinch/configuration/dcc.rb +16 -0
  27. data/lib/cinch/configuration/plugins.rb +41 -0
  28. data/lib/cinch/configuration/sasl.rb +17 -0
  29. data/lib/cinch/configuration/ssl.rb +19 -0
  30. data/lib/cinch/configuration/storage.rb +37 -0
  31. data/lib/cinch/configuration/timeouts.rb +14 -0
  32. data/lib/cinch/constants.rb +531 -369
  33. data/lib/cinch/dcc.rb +12 -0
  34. data/lib/cinch/dcc/dccable_object.rb +37 -0
  35. data/lib/cinch/dcc/incoming.rb +1 -0
  36. data/lib/cinch/dcc/incoming/send.rb +131 -0
  37. data/lib/cinch/dcc/outgoing.rb +1 -0
  38. data/lib/cinch/dcc/outgoing/send.rb +115 -0
  39. data/lib/cinch/exceptions.rb +8 -1
  40. data/lib/cinch/formatting.rb +106 -0
  41. data/lib/cinch/handler.rb +104 -0
  42. data/lib/cinch/handler_list.rb +86 -0
  43. data/lib/cinch/helpers.rb +167 -10
  44. data/lib/cinch/irc.rb +525 -110
  45. data/lib/cinch/isupport.rb +11 -9
  46. data/lib/cinch/logger.rb +168 -0
  47. data/lib/cinch/logger/formatted_logger.rb +72 -55
  48. data/lib/cinch/logger/zcbot_logger.rb +9 -24
  49. data/lib/cinch/logger_list.rb +62 -0
  50. data/lib/cinch/mask.rb +19 -10
  51. data/lib/cinch/message.rb +94 -28
  52. data/lib/cinch/message_queue.rb +70 -28
  53. data/lib/cinch/mode_parser.rb +6 -1
  54. data/lib/cinch/network.rb +104 -0
  55. data/lib/cinch/{rubyext/queue.rb → open_ended_queue.rb} +8 -1
  56. data/lib/cinch/pattern.rb +24 -4
  57. data/lib/cinch/plugin.rb +352 -177
  58. data/lib/cinch/plugin_list.rb +35 -0
  59. data/lib/cinch/rubyext/float.rb +3 -0
  60. data/lib/cinch/rubyext/module.rb +7 -0
  61. data/lib/cinch/rubyext/string.rb +9 -0
  62. data/lib/cinch/sasl.rb +34 -0
  63. data/lib/cinch/sasl/dh_blowfish.rb +71 -0
  64. data/lib/cinch/sasl/diffie_hellman.rb +47 -0
  65. data/lib/cinch/sasl/mechanism.rb +6 -0
  66. data/lib/cinch/sasl/plain.rb +26 -0
  67. data/lib/cinch/storage.rb +62 -0
  68. data/lib/cinch/storage/null.rb +12 -0
  69. data/lib/cinch/storage/yaml.rb +96 -0
  70. data/lib/cinch/syncable.rb +13 -1
  71. data/lib/cinch/target.rb +144 -0
  72. data/lib/cinch/timer.rb +145 -0
  73. data/lib/cinch/user.rb +169 -225
  74. data/lib/cinch/{user_manager.rb → user_list.rb} +7 -2
  75. data/lib/cinch/utilities/deprecation.rb +12 -0
  76. data/lib/cinch/utilities/encoding.rb +54 -0
  77. data/lib/cinch/utilities/kernel.rb +13 -0
  78. data/lib/cinch/utilities/string.rb +13 -0
  79. data/lib/cinch/version.rb +4 -0
  80. metadata +88 -47
  81. data/lib/cinch/logger/logger.rb +0 -44
  82. data/lib/cinch/logger/null_logger.rb +0 -18
  83. data/lib/cinch/rubyext/infinity.rb +0 -1
@@ -1,12 +1,15 @@
1
- require "cinch/cache_manager"
1
+ require "cinch/cached_list"
2
2
 
3
3
  module Cinch
4
- class ChannelManager < CacheManager
4
+ # @since 2.0.0
5
+ # @version 1.1.0
6
+ # @note In prior versions, this class was called ChannelManager
7
+ class ChannelList < CachedList
5
8
  # Finds or creates a channel.
6
9
  #
7
10
  # @param [String] name name of a channel
8
11
  # @return [Channel]
9
- # @see Bot#Channel
12
+ # @see Helpers#Channel
10
13
  def find_ensured(name)
11
14
  downcased_name = name.irc_downcase(@bot.irc.isupport["CASEMAPPING"])
12
15
  @mutex.synchronize do
@@ -0,0 +1,73 @@
1
+ module Cinch
2
+ # @since 2.0.0
3
+ class Configuration < OpenStruct
4
+ KnownOptions = []
5
+
6
+ # Generate a default configuration.
7
+ #
8
+ # @return [Hash]
9
+ def self.default_config
10
+ {}
11
+ end
12
+
13
+ def initialize(base = nil)
14
+ base ||= self.class.default_config
15
+ super(base)
16
+ end
17
+
18
+ # @return [Hash]
19
+ def to_h
20
+ @table.clone
21
+ end
22
+
23
+ def [](key)
24
+ # FIXME also adjust method_missing
25
+ raise ArgumentError, "Unknown option #{key}" unless self.class::KnownOptions.include?(key)
26
+ @table[key]
27
+ end
28
+
29
+ def []=(key, value)
30
+ # FIXME also adjust method_missing
31
+ raise ArgumentError, "Unknown option #{key}" unless self.class::KnownOptions.include?(key)
32
+ modifiable[new_ostruct_member(key)] = value
33
+ end
34
+
35
+ # Loads a configuration from a hash by merging the hash with
36
+ # either the current configuration or the default configuration.
37
+ #
38
+ # @param [Hash] new_config The configuration to load
39
+ # @param [Boolean] from_default If true, the configuration won't
40
+ # be merged with the currently set up configuration (by prior
41
+ # calls to {#load} or {Bot#configure}) but with the default
42
+ # configuration.
43
+ # @return [void]
44
+ def load(new_config, from_default = false)
45
+ if from_default
46
+ @table = self.class.default_config
47
+ end
48
+
49
+ new_config.each do |option, value|
50
+ if value.is_a?(Hash)
51
+ if self[option].is_a?(Configuration)
52
+ self[option].load(value)
53
+ else
54
+ # recursive merging is handled by subclasses like
55
+ # Configuration::Plugins
56
+ self[option] = value
57
+ end
58
+ else
59
+ self[option] = value
60
+ end
61
+ end
62
+ end
63
+
64
+ # Like {#load} but always uses the default configuration
65
+ #
66
+ # @param [Hash] new_config (see #load_config)
67
+ # @return [void]
68
+ # @see #load
69
+ def load!(new_config)
70
+ load(new_config, true)
71
+ end
72
+ end
73
+ end
@@ -0,0 +1,47 @@
1
+ require "cinch/configuration"
2
+
3
+ module Cinch
4
+ class Configuration
5
+ # @since 2.0.0
6
+ class Bot < Configuration
7
+ KnownOptions = [:server, :port, :ssl, :password, :nick, :nicks,
8
+ :realname, :user, :messages_per_second, :server_queue_size,
9
+ :strictness, :message_split_start, :message_split_end,
10
+ :max_messages, :plugins, :channels, :encoding, :reconnect, :max_reconnect_delay,
11
+ :local_host, :timeouts, :ping_interval, :storage, :dcc]
12
+
13
+ # (see Configuration.default_config)
14
+ def self.default_config
15
+ {
16
+ :server => "localhost",
17
+ :port => 6667,
18
+ :ssl => Configuration::SSL.new,
19
+ :password => nil,
20
+ :nick => "cinch",
21
+ :nicks => nil,
22
+ :realname => "cinch",
23
+ :user => "cinch",
24
+ :modes => [],
25
+ :messages_per_second => nil,
26
+ :server_queue_size => nil,
27
+ :strictness => :forgiving,
28
+ :message_split_start => '... ',
29
+ :message_split_end => ' ...',
30
+ :max_messages => nil,
31
+ :plugins => Configuration::Plugins.new,
32
+ :channels => [],
33
+ :encoding => :irc,
34
+ :reconnect => true,
35
+ :max_reconnect_delay => 300,
36
+ :local_host => nil,
37
+ :timeouts => Configuration::Timeouts.new,
38
+ :ping_interval => 120,
39
+ :delay_joins => 0,
40
+ :storage => Configuration::Storage.new,
41
+ :dcc => Configuration::DCC.new,
42
+ :sasl => Configuration::SASL.new,
43
+ }
44
+ end
45
+ end
46
+ end
47
+ end
@@ -0,0 +1,16 @@
1
+ require "cinch/configuration"
2
+
3
+ module Cinch
4
+ class Configuration
5
+ # @since 2.0.0
6
+ class DCC < Configuration
7
+ KnownOptions = [:own_ip]
8
+
9
+ def self.default_config
10
+ {
11
+ :own_ip => nil,
12
+ }
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,41 @@
1
+ require "cinch/configuration"
2
+
3
+ module Cinch
4
+ class Configuration
5
+ # @since 2.0.0
6
+ class Plugins < Configuration
7
+ KnownOptions = [:plugins, :prefix, :suffix, :options]
8
+
9
+ def self.default_config
10
+ {
11
+ :plugins => [],
12
+ :prefix => /^!/,
13
+ :suffix => nil,
14
+ :options => Hash.new {|h,k| h[k] = {}},
15
+ }
16
+ end
17
+
18
+ def load(new_config, from_default = false)
19
+ _new_config = {}
20
+ new_config.each do |option, value|
21
+ case option
22
+ when :plugins
23
+ _new_config[option] = value.map{|v| Cinch::Utilities::Kernel.string_to_const(v)}
24
+ when :options
25
+ _value = self[:options]
26
+ value.each do |k, v|
27
+ k = Cinch::Utilities::Kernel.string_to_const(k)
28
+ v = self[:options][k].merge(v)
29
+ _value[k] = v
30
+ end
31
+ _new_config[option] = _value
32
+ else
33
+ _new_config[option] = value
34
+ end
35
+ end
36
+
37
+ super(_new_config, from_default)
38
+ end
39
+ end
40
+ end
41
+ end
@@ -0,0 +1,17 @@
1
+ require "cinch/configuration"
2
+
3
+ module Cinch
4
+ class Configuration
5
+ # @since 2.0.0
6
+ class SASL < Configuration
7
+ KnownOptions = [:username, :password]
8
+
9
+ def self.default_config
10
+ {
11
+ :username => nil,
12
+ :password => nil,
13
+ }
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,19 @@
1
+ require "cinch/configuration"
2
+
3
+ module Cinch
4
+ class Configuration
5
+ # @since 2.0.0
6
+ class SSL < Configuration
7
+ KnownOptions = [:use, :verify, :client_cert, :ca_path]
8
+
9
+ def self.default_config
10
+ {
11
+ :use => false,
12
+ :verify => false,
13
+ :client_cert => nil,
14
+ :ca_path => "/etc/ssl/certs",
15
+ }
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,37 @@
1
+ require "cinch/configuration"
2
+ require "cinch/storage/null"
3
+
4
+ module Cinch
5
+ class Configuration
6
+ # @since 2.0.0
7
+ class Storage < Configuration
8
+ def self.default_config
9
+ {
10
+ :backend => Cinch::Storage::Null
11
+ }
12
+ end
13
+
14
+ def [](key)
15
+ @table[key]
16
+ end
17
+
18
+ def []=(key, value)
19
+ modifiable[new_ostruct_member(key)] = value
20
+ end
21
+
22
+ def load(new_config, from_default)
23
+ _new_config = {}
24
+ new_config.each do |option, value|
25
+ case option
26
+ when :backend
27
+ _new_config[option] = Cinch::Utilities::Kernel.string_to_const(value)
28
+ else
29
+ _new_config[option] = value
30
+ end
31
+ end
32
+
33
+ super(_new_config, from_default)
34
+ end
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,14 @@
1
+ require "cinch/configuration"
2
+
3
+ module Cinch
4
+ class Configuration
5
+ # @since 2.0.0
6
+ class Timeouts < Configuration
7
+ KnownOptions = [:read, :connect]
8
+
9
+ def self.default_config
10
+ {:read => 240, :connect => 10,}
11
+ end
12
+ end
13
+ end
14
+ end
@@ -1,371 +1,533 @@
1
1
  module Cinch
2
- # Used to indicate the nickname parameter supplied to a command is
3
- # currently unused.
4
- ERR_NOSUCHNICK = 401
5
-
6
- # Used to indicate the server name given currently doesn't exist.
7
- ERR_NOSUCHSERVER = 402
8
-
9
- # Used to indicate the given channel name is invalid.
10
- ERR_NOSUCHCHANNEL = 403
11
-
12
- # Sent to a user who is either
13
- # - not on a channel which is mode +n
14
- # - not a chanop (or mode +v) on a channel which has mode +m set
15
- # and is trying to send a PRIVMSG message to that channel.
16
- ERR_CANNOTSENDTOCHAN = 404
17
-
18
- # Sent to a user when they have joined the maximum number of allowed
19
- # channels and they try to join another channel.
20
- ERR_TOOMANYCHANNELS = 405
21
-
22
- # Returned by WHOWAS to indicate there is no history information for
23
- # that nickname.
24
- ERR_WASNOSUCHNICK = 406
25
-
26
- # Returned to a client which is attempting to send PRIVMSG/NOTICE
27
- # using the user@host destination format and for a user@host which has
28
- # several occurrences.
29
- ERR_TOOMANYTARGETS = 407
30
-
31
- # PING or PONG message missing the originator parameter which is
32
- # required since these commands must work without valid prefixes.
33
- ERR_NOORIGIN = 409
34
- ERR_NORECIPIENT = 411
35
- ERR_NOTEXTTOSEND = 412
36
- ERR_NOTOPLEVEL = 413
37
-
38
- # 412 - 414 are returned by PRIVMSG to indicate that the message
39
- # wasn't delivered for some reason. ERR_NOTOPLEVEL and
40
- # ERR_WILDTOPLEVEL are errors that are returned when an invalid use of
41
- # "PRIVMSG $&lt;server&gt;" or "PRIVMSG #&lt;host&gt;" is attempted.
42
- ERR_WILDTOPLEVEL = 414
43
-
44
- # Returned to a registered client to indicate that the command sent is
45
- # unknown by the server.
46
- ERR_UNKNOWNCOMMAND = 421
47
-
48
- # Server's MOTD file could not be opened by the server.
49
- ERR_NOMOTD = 422
50
-
51
- # Returned by a server in response to an ADMIN message when there is
52
- # an error in finding the appropriate information.
53
- ERR_NOADMININFO = 423
54
-
55
- # Generic error message used to report a failed file operation during
56
- # the processing of a message.
57
- ERR_FILEERROR = 424
58
-
59
- # Returned when a nickname parameter expected for a command and isn't
60
- # found.
61
- ERR_NONICKNAMEGIVEN = 431
62
-
63
- # Returned after receiving a NICK message which contains characters
64
- # which do not fall in the defined set.
65
- ERR_ERRONEUSNICKNAME = 432
66
-
67
- # Returned when a NICK message is processed that results in an attempt
68
- # to change to a currently existing nickname.
69
- ERR_NICKNAMEINUSE = 433
70
-
71
- # Returned by a server to a client when it detects a nickname
72
- # collision (registered of a NICK that already exists by another
73
- # server).
74
- ERR_NICKCOLLISION = 436
75
-
76
- # Returned by the server to indicate that the target user of the
77
- # command is not on the given channel.
78
- ERR_USERNOTINCHANNEL = 441
79
-
80
- # Returned by the server whenever a client tries to perform a channel
81
- # effecting command for which the client isn't a member.
82
- ERR_NOTONCHANNEL = 442
83
-
84
- # Returned when a client tries to invite a user to a channel they are
85
- # already on.
86
- ERR_USERONCHANNEL = 443
87
-
88
- # Returned by the summon after a SUMMON command for a user was unable
89
- # to be performed since they were not logged in.
90
- ERR_NOLOGIN = 444
91
-
92
- # Returned as a response to the SUMMON command. Must be returned by
93
- # any server which does not implement it.
94
- ERR_SUMMONDISABLED = 445
95
-
96
- # Returned as a response to the USERS command. Must be returned by any
97
- # server which does not implement it.
98
- ERR_USERSDISABLED = 446
99
-
100
- # Returned by the server to indicate that the client must be
101
- # registered before the server will allow it to be parsed in detail.
102
- ERR_NOTREGISTERED = 451
103
-
104
- # Returned by the server by numerous commands to indicate to the
105
- # client that it didn't supply enough parameters.
106
- ERR_NEEDMOREPARAMS = 461
107
-
108
- # Returned by the server to any link which tries to change part of the
109
- # registered details (such as password or user details from second
110
- # USER message).
111
- ERR_ALREADYREGISTRED = 462
112
-
113
- # Returned to a client which attempts to register with a server which
114
- # does not been setup to allow connections from the host the attempted
115
- # connection is tried.
116
- ERR_NOPERMFORHOST = 463
117
-
118
- # Returned to indicate a failed attempt at registering a connection
119
- # for which a password was required and was either not given or
120
- # incorrect.
121
- ERR_PASSWDMISMATCH = 464
122
-
123
- # Returned after an attempt to connect and register yourself with a
124
- # server which has been setup to explicitly deny connections to you.
125
- ERR_YOUREBANNEDCREEP = 465
126
- ERR_KEYSET = 467
127
- ERR_CHANNELISFULL = 471
128
- ERR_UNKNOWNMODE = 472
129
- ERR_INVITEONLYCHAN = 473
130
- ERR_BANNEDFROMCHAN = 474
131
- ERR_BADCHANNELKEY = 475
132
-
133
- # Any command requiring operator privileges to operate must return
134
- # this error to indicate the attempt was unsuccessful.
135
- ERR_NOPRIVILEGES = 481
136
-
137
- # Any command requiring 'chanop' privileges (such as MODE messages)
138
- # must return this error if the client making the attempt is not a
139
- # chanop on the specified channel.
140
- ERR_CHANOPRIVSNEEDED = 482
141
-
142
- # Any attempts to use the KILL command on a server are to be refused
143
- # and this error returned directly to the client.
144
- ERR_CANTKILLSERVER = 483
145
-
146
- # If a client sends an OPER message and the server has not been
147
- # configured to allow connections from the client's host as an
148
- # operator, this error must be returned.
149
- ERR_NOOPERHOST = 491
150
-
151
- # Returned by the server to indicate that a MODE message was sent with
152
- # a nickname parameter and that the a mode flag sent was not
153
- # recognized.
154
- ERR_UMODEUNKNOWNFLAG = 501
155
-
156
- # Error sent to any user trying to view or change the user mode for a
157
- # user other than themselves.
158
- ERR_USERSDONTMATCH = 502
159
- RPL_NONE = 300
160
-
161
- # Reply format used by USERHOST to list replies to the query list.
162
- RPL_USERHOST = 302
163
-
164
- # Reply format used by ISON to list replies to the query list.
165
- RPL_ISON = 303
166
-
167
- # RPL_AWAY is sent to any client sending a PRIVMSG to a client which
168
- # is away. RPL_AWAY is only sent by the server to which the client is
169
- # connected.
170
- RPL_AWAY = 301
171
-
172
- # Replies RPL_UNAWAY and RPL_NOWAWAY are sent when the client removes
173
- # and sets an AWAY message
174
- RPL_UNAWAY = 305
175
-
176
- # Replies RPL_UNAWAY and RPL_NOWAWAY are sent when the client removes
177
- # and sets an AWAY message
178
- RPL_NOWAWAY = 306
179
- RPL_WHOISUSER = 311
180
- RPL_WHOISSERVER = 312
181
- RPL_WHOISOPERATOR = 313
182
- RPL_WHOISIDLE = 317
183
- RPL_ENDOFWHOIS = 318
184
-
185
- # Replies 311 - 313, 317 - 319 are all replies generated in response
186
- # to a WHOIS message. Given that there are enough parameters present,
187
- # the answering server must either formulate a reply out of the above
188
- # numerics (if the query nick is found) or return an error reply. The
189
- # '*' in RPL_WHOISUSER is there as the literal character and not as a
190
- # wild card. For each reply set, only RPL_WHOISCHANNELS may appear
191
- # more than once (for long lists of channel names). The '@' and '+'
192
- # characters next to the channel name indicate whether a client is a
193
- # channel operator or has been granted permission to speak on a
194
- # moderated channel. The RPL_ENDOFWHOIS reply is used to mark the end
195
- # of processing a WHOIS message.
196
- RPL_WHOISCHANNELS = 319
197
- RPL_WHOWASUSER = 314
198
-
199
- # When replying to a WHOWAS message, a server must use the replies
200
- # RPL_WHOWASUSER, RPL_WHOISSERVER or ERR_WASNOSUCHNICK for each
201
- # nickname in the presented list. At the end of all reply batches,
202
- # there must be RPL_ENDOFWHOWAS (even if there was only one reply and
203
- # it was an error).
204
- RPL_ENDOFWHOWAS = 369
205
- RPL_LISTSTART = 321
206
- RPL_LIST = 322
207
-
208
- # Replies RPL_LISTSTART, RPL_LIST, RPL_LISTEND mark the start, actual
209
- # replies with data and end of the server's response to a LIST
210
- # command. If there are no channels available to return, only the
211
- # start and end reply must be sent.
212
- RPL_LISTEND = 323
213
- RPL_CHANNELMODEIS = 324
214
- RPL_NOTOPIC = 331
215
-
216
- # When sending a TOPIC message to determine the channel topic, one of
217
- # two replies is sent. If the topic is set, RPL_TOPIC is sent back
218
- # else RPL_NOTOPIC.
219
- RPL_TOPIC = 332
220
-
221
- # Returned by the server to indicate that the attempted INVITE message
222
- # was successful and is being passed onto the end client.
223
- RPL_INVITING = 341
224
-
225
- # Returned by a server answering a SUMMON message to indicate that it
226
- # is summoning that user.
227
- RPL_SUMMONING = 342
228
-
229
- # Reply by the server showing its version details. The &lt;version&gt;
230
- # is the version of the software being used (including any patchlevel
231
- # revisions) and the &lt;debuglevel&gt; is used to indicate if the
232
- # server is running in "debug mode".
233
- #
234
- #The "comments" field may contain any comments about the version or
235
- # further version details.
236
- RPL_VERSION = 351
237
- RPL_WHOREPLY = 352
238
-
239
- # The RPL_WHOREPLY and RPL_ENDOFWHO pair are used to answer a WHO
240
- # message. The RPL_WHOREPLY is only sent if there is an appropriate
241
- # match to the WHO query. If there is a list of parameters supplied
242
- # with a WHO message, a RPL_ENDOFWHO must be sent after processing
243
- # each list item with &lt;name&gt; being the item.
244
- RPL_ENDOFWHO = 315
245
- RPL_NAMREPLY = 353
246
- RPL_NAMEREPLY = RPL_NAMREPLY
247
-
248
- # To reply to a NAMES message, a reply pair consisting of RPL_NAMREPLY
249
- # and RPL_ENDOFNAMES is sent by the server back to the client. If
250
- # there is no channel found as in the query, then only RPL_ENDOFNAMES
251
- # is returned. The exception to this is when a NAMES message is sent
252
- # with no parameters and all visible channels and contents are sent
253
- # back in a series of RPL_NAMEREPLY messages with a RPL_ENDOFNAMES to
254
- # mark the end.
255
- RPL_ENDOFNAMES = 366
256
- RPL_LINKS = 364
257
-
258
- # In replying to the LINKS message, a server must send replies back
259
- # using the RPL_LINKS numeric and mark the end of the list using an
260
- # RPL_ENDOFLINKS reply.
261
- RPL_ENDOFLINKS = 365
262
- RPL_BANLIST = 367
263
-
264
- # When listing the active 'bans' for a given channel, a server is
265
- # required to send the list back using the RPL_BANLIST and
266
- # RPL_ENDOFBANLIST messages. A separate RPL_BANLIST is sent for each
267
- # active banid. After the banids have been listed (or if none present)
268
- # a RPL_ENDOFBANLIST must be sent.
269
- RPL_ENDOFBANLIST = 368
270
- RPL_INFO = 371
271
-
272
- # A server responding to an INFO message is required to send all its
273
- # 'info' in a series of RPL_INFO messages with a RPL_ENDOFINFO reply
274
- # to indicate the end of the replies.
275
- RPL_ENDOFINFO = 374
276
- RPL_MOTDSTART = 375
277
- RPL_MOTD = 372
278
-
279
- # When responding to the MOTD message and the MOTD file is found, the
280
- # file is displayed line by line, with each line no longer than 80
281
- # characters, using RPL_MOTD format replies. These should be
282
- # surrounded by a RPL_MOTDSTART (before the RPL_MOTDs) and an
283
- # RPL_ENDOFMOTD (after).
284
- RPL_ENDOFMOTD = 376
285
-
286
- # RPL_YOUREOPER is sent back to a client which has just successfully
287
- # issued an OPER message and gained operator status.
288
- RPL_YOUREOPER = 381
289
-
290
- # If the REHASH option is used and an operator sends a REHASH message,
291
- # an RPL_REHASHING is sent back to the operator.
292
- RPL_REHASHING = 382
293
-
294
- # When replying to the TIME message, a server must send the reply
295
- # using the RPL_TIME format above. The string showing the time need
296
- # only contain the correct day and time there. There is no further
297
- # requirement for the time string.
298
- RPL_TIME = 391
299
- RPL_USERSSTART = 392
300
- RPL_USERS = 393
301
- RPL_ENDOFUSERS = 394
302
-
303
- # If the USERS message is handled by a server, the replies
304
- # RPL_USERSTART, RPL_USERS, RPL_ENDOFUSERS and RPL_NOUSERS are used.
305
- # RPL_USERSSTART must be sent first, following by either a sequence of
306
- # RPL_USERS or a single RPL_NOUSER. Following this is RPL_ENDOFUSERS.
307
- RPL_NOUSERS = 395
308
- RPL_TRACELINK = 200
309
- RPL_TRACECONNECTING = 201
310
- RPL_TRACEHANDSHAKE = 202
311
- RPL_TRACEUNKNOWN = 203
312
- RPL_TRACEOPERATOR = 204
313
- RPL_TRACEUSER = 205
314
- RPL_TRACESERVER = 206
315
- RPL_TRACENEWTYPE = 208
316
-
317
- # The RPL_TRACE* are all returned by the server in response to the
318
- # TRACE message. How many are returned is dependent on the the TRACE
319
- # message and whether it was sent by an operator or not. There is no
320
- # predefined order for which occurs first. Replies RPL_TRACEUNKNOWN,
321
- # RPL_TRACECONNECTING and RPL_TRACEHANDSHAKE are all used for
322
- # connections which have not been fully established and are either
323
- # unknown, still attempting to connect or in the process of completing
324
- # the 'server handshake'. RPL_TRACELINK is sent by any server which
325
- # handles a TRACE message and has to pass it on to another server. The
326
- # list of RPL_TRACELINKs sent in response to a TRACE command
327
- # traversing the IRC network should reflect the actual connectivity of
328
- # the servers themselves along that path. RPL_TRACENEWTYPE is to be
329
- # used for any connection which does not fit in the other categories
330
- # but is being displayed anyway.
331
- RPL_TRACELOG = 261
332
- RPL_STATSLINKINFO = 211
333
- RPL_STATSCOMMANDS = 212
334
- RPL_STATSCLINE = 213
335
- RPL_STATSNLINE = 214
336
- RPL_STATSILINE = 215
337
- RPL_STATSKLINE = 216
338
- RPL_STATSYLINE = 218
339
- RPL_ENDOFSTATS = 219
340
- RPL_STATSLLINE = 241
341
- RPL_STATSUPTIME = 242
342
- RPL_STATSOLINE = 243
343
- RPL_STATSHLINE = 244
344
-
345
- # To answer a query about a client's own mode, RPL_UMODEIS is sent
346
- # back.
347
- RPL_UMODEIS = 221
348
- RPL_LUSERCLIENT = 251
349
- RPL_LUSEROP = 252
350
- RPL_LUSERUNKNOWN = 253
351
- RPL_LUSERCHANNELS = 254
352
-
353
- # In processing an LUSERS message, the server sends a set of replies
354
- # from RPL_LUSERCLIENT, RPL_LUSEROP, RPL_USERUNKNOWN,
355
- # RPL_LUSERCHANNELS and RPL_LUSERME. When replying, a server must send
356
- # back RPL_LUSERCLIENT and RPL_LUSERME. The other replies are only
357
- # sent back if a non-zero count is found for them.
358
- RPL_LUSERME = 255
359
- RPL_ADMINME = 256
360
- RPL_ADMINLOC1 = 257
361
- RPL_ADMINLOC2 = 258
362
-
363
- # When replying to an ADMIN message, a server is expected to use
364
- # replies RLP_ADMINME through to RPL_ADMINEMAIL and provide a text
365
- # message with each. For RPL_ADMINLOC1 a description of what city,
366
- # state and country the server is in is expected, followed by details
367
- # of the university and department (RPL_ADMINLOC2) and finally the
368
- # administrative contact for the server (an email address here is
369
- # required) in RPL_ADMINEMAIL.
370
- RPL_ADMINEMAIL = 259
2
+ # All standard and some non-standard numeric replies used by the IRC
3
+ # protocol.
4
+ module Constants
5
+ # Used to indicate the nickname parameter supplied to a command is
6
+ # currently unused.
7
+ ERR_NOSUCHNICK = 401
8
+
9
+ # Used to indicate the server name given currently doesn't exist.
10
+ ERR_NOSUCHSERVER = 402
11
+
12
+ # Used to indicate the given channel name is invalid.
13
+ ERR_NOSUCHCHANNEL = 403
14
+
15
+ # Sent to a user who is either
16
+ # - not on a channel which is mode +n
17
+ # - not a chanop (or mode +v) on a channel which has mode +m set
18
+ # and is trying to send a PRIVMSG message to that channel.
19
+ ERR_CANNOTSENDTOCHAN = 404
20
+
21
+ # Sent to a user when they have joined the maximum number of allowed
22
+ # channels and they try to join another channel.
23
+ ERR_TOOMANYCHANNELS = 405
24
+
25
+ # Returned by WHOWAS to indicate there is no history information for
26
+ # that nickname.
27
+ ERR_WASNOSUCHNICK = 406
28
+
29
+ # Returned to a client which is attempting to send PRIVMSG/NOTICE
30
+ # using the user@host destination format and for a user@host which has
31
+ # several occurrences.
32
+ ERR_TOOMANYTARGETS = 407
33
+
34
+ # PING or PONG message missing the originator parameter which is
35
+ # required since these commands must work without valid prefixes.
36
+ ERR_NOORIGIN = 409
37
+
38
+ # @todo Document this constant
39
+ ERR_NORECIPIENT = 411
40
+
41
+ # @todo Document this constant
42
+ ERR_NOTEXTTOSEND = 412
43
+
44
+ # @todo Document this constant
45
+ ERR_NOTOPLEVEL = 413
46
+
47
+ # 412 - 414 are returned by PRIVMSG to indicate that the message
48
+ # wasn't delivered for some reason. ERR_NOTOPLEVEL and
49
+ # ERR_WILDTOPLEVEL are errors that are returned when an invalid use of
50
+ # "PRIVMSG $&lt;server&gt;" or "PRIVMSG #&lt;host&gt;" is attempted.
51
+ ERR_WILDTOPLEVEL = 414
52
+
53
+ # Returned to a registered client to indicate that the command sent is
54
+ # unknown by the server.
55
+ ERR_UNKNOWNCOMMAND = 421
56
+
57
+ # Server's MOTD file could not be opened by the server.
58
+ ERR_NOMOTD = 422
59
+
60
+ # Returned by a server in response to an ADMIN message when there is
61
+ # an error in finding the appropriate information.
62
+ ERR_NOADMININFO = 423
63
+
64
+ # Generic error message used to report a failed file operation during
65
+ # the processing of a message.
66
+ ERR_FILEERROR = 424
67
+
68
+ # Returned when a nickname parameter expected for a command and isn't
69
+ # found.
70
+ ERR_NONICKNAMEGIVEN = 431
71
+
72
+ # Returned after receiving a NICK message which contains characters
73
+ # which do not fall in the defined set.
74
+ ERR_ERRONEUSNICKNAME = 432
75
+
76
+ # Returned when a NICK message is processed that results in an attempt
77
+ # to change to a currently existing nickname.
78
+ ERR_NICKNAMEINUSE = 433
79
+
80
+ # Returned by a server to a client when it detects a nickname
81
+ # collision (registered of a NICK that already exists by another
82
+ # server).
83
+ ERR_NICKCOLLISION = 436
84
+
85
+ # Returned by the server to indicate that the target user of the
86
+ # command is not on the given channel.
87
+ ERR_USERNOTINCHANNEL = 441
88
+
89
+ # Returned by the server whenever a client tries to perform a channel
90
+ # effecting command for which the client isn't a member.
91
+ ERR_NOTONCHANNEL = 442
92
+
93
+ # Returned when a client tries to invite a user to a channel they are
94
+ # already on.
95
+ ERR_USERONCHANNEL = 443
96
+
97
+ # Returned by the summon after a SUMMON command for a user was unable
98
+ # to be performed since they were not logged in.
99
+ ERR_NOLOGIN = 444
100
+
101
+ # Returned as a response to the SUMMON command. Must be returned by
102
+ # any server which does not implement it.
103
+ ERR_SUMMONDISABLED = 445
104
+
105
+ # Returned as a response to the USERS command. Must be returned by any
106
+ # server which does not implement it.
107
+ ERR_USERSDISABLED = 446
108
+
109
+ # Returned by the server to indicate that the client must be
110
+ # registered before the server will allow it to be parsed in detail.
111
+ ERR_NOTREGISTERED = 451
112
+
113
+ # Returned by the server by numerous commands to indicate to the
114
+ # client that it didn't supply enough parameters.
115
+ ERR_NEEDMOREPARAMS = 461
116
+
117
+ # Returned by the server to any link which tries to change part of the
118
+ # registered details (such as password or user details from second
119
+ # USER message).
120
+ ERR_ALREADYREGISTRED = 462
121
+
122
+ # Returned to a client which attempts to register with a server which
123
+ # does not been setup to allow connections from the host the attempted
124
+ # connection is tried.
125
+ ERR_NOPERMFORHOST = 463
126
+
127
+ # Returned to indicate a failed attempt at registering a connection
128
+ # for which a password was required and was either not given or
129
+ # incorrect.
130
+ ERR_PASSWDMISMATCH = 464
131
+
132
+ # Returned after an attempt to connect and register yourself with a
133
+ # server which has been setup to explicitly deny connections to you.
134
+ ERR_YOUREBANNEDCREEP = 465
135
+
136
+ # @todo Document this constant
137
+ ERR_KEYSET = 467
138
+
139
+ # @todo Document this constant
140
+ ERR_CHANNELISFULL = 471
141
+
142
+ # @todo Document this constant
143
+ ERR_UNKNOWNMODE = 472
144
+
145
+ # @todo Document this constant
146
+ ERR_INVITEONLYCHAN = 473
147
+
148
+ # @todo Document this constant
149
+ ERR_BANNEDFROMCHAN = 474
150
+
151
+ # @todo Document this constant
152
+ ERR_BADCHANNELKEY = 475
153
+
154
+ # Any command requiring operator privileges to operate must return
155
+ # this error to indicate the attempt was unsuccessful.
156
+ ERR_NOPRIVILEGES = 481
157
+
158
+ # Any command requiring 'chanop' privileges (such as MODE messages)
159
+ # must return this error if the client making the attempt is not a
160
+ # chanop on the specified channel.
161
+ ERR_CHANOPRIVSNEEDED = 482
162
+
163
+ # Any attempts to use the KILL command on a server are to be refused
164
+ # and this error returned directly to the client.
165
+ ERR_CANTKILLSERVER = 483
166
+
167
+ # If a client sends an OPER message and the server has not been
168
+ # configured to allow connections from the client's host as an
169
+ # operator, this error must be returned.
170
+ ERR_NOOPERHOST = 491
171
+
172
+ # Returned by the server to indicate that a MODE message was sent with
173
+ # a nickname parameter and that the a mode flag sent was not
174
+ # recognized.
175
+ ERR_UMODEUNKNOWNFLAG = 501
176
+
177
+ # Error sent to any user trying to view or change the user mode for a
178
+ # user other than themselves.
179
+ ERR_USERSDONTMATCH = 502
180
+
181
+ # @todo Document this constant
182
+ RPL_NONE = 300
183
+
184
+ # Reply format used by USERHOST to list replies to the query list.
185
+ RPL_USERHOST = 302
186
+
187
+ # Reply format used by ISON to list replies to the query list.
188
+ RPL_ISON = 303
189
+
190
+ # RPL_AWAY is sent to any client sending a PRIVMSG to a client which
191
+ # is away. RPL_AWAY is only sent by the server to which the client is
192
+ # connected.
193
+ RPL_AWAY = 301
194
+
195
+ # Replies RPL_UNAWAY and RPL_NOWAWAY are sent when the client removes
196
+ # and sets an AWAY message
197
+ RPL_UNAWAY = 305
198
+
199
+ # Replies RPL_UNAWAY and RPL_NOWAWAY are sent when the client removes
200
+ # and sets an AWAY message
201
+ RPL_NOWAWAY = 306
202
+
203
+ # @todo Document this constant
204
+ RPL_WHOISUSER = 311
205
+
206
+ # @todo Document this constant
207
+ RPL_WHOISSERVER = 312
208
+
209
+ # @todo Document this constant
210
+ RPL_WHOISOPERATOR = 313
211
+
212
+ # @todo Document this constant
213
+ RPL_WHOISIDLE = 317
214
+
215
+ # @todo Document this constant
216
+ RPL_ENDOFWHOIS = 318
217
+
218
+ # Replies 311 - 313, 317 - 319 are all replies generated in response
219
+ # to a WHOIS message. Given that there are enough parameters present,
220
+ # the answering server must either formulate a reply out of the above
221
+ # numerics (if the query nick is found) or return an error reply. The
222
+ # '*' in RPL_WHOISUSER is there as the literal character and not as a
223
+ # wild card. For each reply set, only RPL_WHOISCHANNELS may appear
224
+ # more than once (for long lists of channel names). The '@' and '+'
225
+ # characters next to the channel name indicate whether a client is a
226
+ # channel operator or has been granted permission to speak on a
227
+ # moderated channel. The RPL_ENDOFWHOIS reply is used to mark the end
228
+ # of processing a WHOIS message.
229
+ RPL_WHOISCHANNELS = 319
230
+
231
+ # @todo Document this constant
232
+ RPL_WHOWASUSER = 314
233
+
234
+ # When replying to a WHOWAS message, a server must use the replies
235
+ # RPL_WHOWASUSER, RPL_WHOISSERVER or ERR_WASNOSUCHNICK for each
236
+ # nickname in the presented list. At the end of all reply batches,
237
+ # there must be RPL_ENDOFWHOWAS (even if there was only one reply and
238
+ # it was an error).
239
+ RPL_ENDOFWHOWAS = 369
240
+
241
+ # @todo Document this constant
242
+ RPL_LISTSTART = 321
243
+
244
+ # @todo Document this constant
245
+ RPL_LIST = 322
246
+
247
+ # Replies RPL_LISTSTART, RPL_LIST, RPL_LISTEND mark the start, actual
248
+ # replies with data and end of the server's response to a LIST
249
+ # command. If there are no channels available to return, only the
250
+ # start and end reply must be sent.
251
+ RPL_LISTEND = 323
252
+
253
+ # @todo Document this constant
254
+ RPL_CHANNELMODEIS = 324
255
+
256
+ # @todo Document this constant
257
+ RPL_NOTOPIC = 331
258
+
259
+ # When sending a TOPIC message to determine the channel topic, one of
260
+ # two replies is sent. If the topic is set, RPL_TOPIC is sent back
261
+ # else RPL_NOTOPIC.
262
+ RPL_TOPIC = 332
263
+
264
+ # Returned by the server to indicate that the attempted INVITE message
265
+ # was successful and is being passed onto the end client.
266
+ RPL_INVITING = 341
267
+
268
+ # Returned by a server answering a SUMMON message to indicate that it
269
+ # is summoning that user.
270
+ RPL_SUMMONING = 342
271
+
272
+ # Reply by the server showing its version details. The &lt;version&gt;
273
+ # is the version of the software being used (including any patchlevel
274
+ # revisions) and the &lt;debuglevel&gt; is used to indicate if the
275
+ # server is running in "debug mode".
276
+ #
277
+ #The "comments" field may contain any comments about the version or
278
+ # further version details.
279
+ RPL_VERSION = 351
280
+
281
+ # @todo Document this constant
282
+ RPL_WHOREPLY = 352
283
+
284
+ # The RPL_WHOREPLY and RPL_ENDOFWHO pair are used to answer a WHO
285
+ # message. The RPL_WHOREPLY is only sent if there is an appropriate
286
+ # match to the WHO query. If there is a list of parameters supplied
287
+ # with a WHO message, a RPL_ENDOFWHO must be sent after processing
288
+ # each list item with &lt;name&gt; being the item.
289
+ RPL_ENDOFWHO = 315
290
+
291
+ # @todo Document this constant
292
+ RPL_NAMREPLY = 353
293
+
294
+ # @todo Document this constant
295
+ RPL_NAMEREPLY = RPL_NAMREPLY
296
+
297
+ # @todo Document this constant
298
+ RPL_WHOSPCRPL = 354
299
+
300
+ # To reply to a NAMES message, a reply pair consisting of RPL_NAMREPLY
301
+ # and RPL_ENDOFNAMES is sent by the server back to the client. If
302
+ # there is no channel found as in the query, then only RPL_ENDOFNAMES
303
+ # is returned. The exception to this is when a NAMES message is sent
304
+ # with no parameters and all visible channels and contents are sent
305
+ # back in a series of RPL_NAMEREPLY messages with a RPL_ENDOFNAMES to
306
+ # mark the end.
307
+ RPL_ENDOFNAMES = 366
308
+
309
+ # @todo Document this constant
310
+ RPL_LINKS = 364
311
+
312
+ # In replying to the LINKS message, a server must send replies back
313
+ # using the RPL_LINKS numeric and mark the end of the list using an
314
+ # RPL_ENDOFLINKS reply.
315
+ RPL_ENDOFLINKS = 365
316
+
317
+ # @todo Document this constant
318
+ RPL_BANLIST = 367
319
+
320
+ # When listing the active 'bans' for a given channel, a server is
321
+ # required to send the list back using the RPL_BANLIST and
322
+ # RPL_ENDOFBANLIST messages. A separate RPL_BANLIST is sent for each
323
+ # active banid. After the banids have been listed (or if none present)
324
+ # a RPL_ENDOFBANLIST must be sent.
325
+ RPL_ENDOFBANLIST = 368
326
+
327
+ # @todo Document this constant
328
+ RPL_INFO = 371
329
+
330
+ # A server responding to an INFO message is required to send all its
331
+ # 'info' in a series of RPL_INFO messages with a RPL_ENDOFINFO reply
332
+ # to indicate the end of the replies.
333
+ RPL_ENDOFINFO = 374
334
+
335
+ # @todo Document this constant
336
+ RPL_MOTDSTART = 375
337
+
338
+ # @todo Document this constant
339
+ RPL_MOTD = 372
340
+
341
+ # When responding to the MOTD message and the MOTD file is found, the
342
+ # file is displayed line by line, with each line no longer than 80
343
+ # characters, using RPL_MOTD format replies. These should be
344
+ # surrounded by a RPL_MOTDSTART (before the RPL_MOTDs) and an
345
+ # RPL_ENDOFMOTD (after).
346
+ RPL_ENDOFMOTD = 376
347
+
348
+ # RPL_YOUREOPER is sent back to a client which has just successfully
349
+ # issued an OPER message and gained operator status.
350
+ RPL_YOUREOPER = 381
351
+
352
+ # If the REHASH option is used and an operator sends a REHASH message,
353
+ # an RPL_REHASHING is sent back to the operator.
354
+ RPL_REHASHING = 382
355
+
356
+ # @todo Document this constant
357
+ RPL_QLIST = 386
358
+
359
+ # @todo Document this constant
360
+ RPL_ENDOFQLIST = 387
361
+
362
+ # When replying to the TIME message, a server must send the reply
363
+ # using the RPL_TIME format above. The string showing the time need
364
+ # only contain the correct day and time there. There is no further
365
+ # requirement for the time string.
366
+ RPL_TIME = 391
367
+
368
+ # @todo Document this constant
369
+ RPL_USERSSTART = 392
370
+
371
+ # @todo Document this constant
372
+ RPL_USERS = 393
373
+
374
+ # @todo Document this constant
375
+ RPL_ENDOFUSERS = 394
376
+
377
+ # If the USERS message is handled by a server, the replies
378
+ # RPL_USERSTART, RPL_USERS, RPL_ENDOFUSERS and RPL_NOUSERS are used.
379
+ # RPL_USERSSTART must be sent first, following by either a sequence of
380
+ # RPL_USERS or a single RPL_NOUSER. Following this is RPL_ENDOFUSERS.
381
+ RPL_NOUSERS = 395
382
+
383
+ # @todo Document this constant
384
+ RPL_TRACELINK = 200
385
+
386
+ # @todo Document this constant
387
+ RPL_TRACECONNECTING = 201
388
+
389
+ # @todo Document this constant
390
+ RPL_TRACEHANDSHAKE = 202
391
+
392
+ # @todo Document this constant
393
+ RPL_TRACEUNKNOWN = 203
394
+
395
+ # @todo Document this constant
396
+ RPL_TRACEOPERATOR = 204
397
+
398
+ # @todo Document this constant
399
+ RPL_TRACEUSER = 205
400
+
401
+ # @todo Document this constant
402
+ RPL_TRACESERVER = 206
403
+
404
+ # @todo Document this constant
405
+ RPL_TRACENEWTYPE = 208
406
+
407
+ # The RPL_TRACE* are all returned by the server in response to the
408
+ # TRACE message. How many are returned is dependent on the the TRACE
409
+ # message and whether it was sent by an operator or not. There is no
410
+ # predefined order for which occurs first. Replies RPL_TRACEUNKNOWN,
411
+ # RPL_TRACECONNECTING and RPL_TRACEHANDSHAKE are all used for
412
+ # connections which have not been fully established and are either
413
+ # unknown, still attempting to connect or in the process of completing
414
+ # the 'server handshake'. RPL_TRACELINK is sent by any server which
415
+ # handles a TRACE message and has to pass it on to another server. The
416
+ # list of RPL_TRACELINKs sent in response to a TRACE command
417
+ # traversing the IRC network should reflect the actual connectivity of
418
+ # the servers themselves along that path. RPL_TRACENEWTYPE is to be
419
+ # used for any connection which does not fit in the other categories
420
+ # but is being displayed anyway.
421
+ RPL_TRACELOG = 261
422
+
423
+ # @todo Document this constant
424
+ RPL_STATSLINKINFO = 211
425
+
426
+ # @todo Document this constant
427
+ RPL_STATSCOMMANDS = 212
428
+
429
+ # @todo Document this constant
430
+ RPL_STATSCLINE = 213
431
+
432
+ # @todo Document this constant
433
+ RPL_STATSNLINE = 214
434
+
435
+ # @todo Document this constant
436
+ RPL_STATSILINE = 215
437
+
438
+ # @todo Document this constant
439
+ RPL_STATSKLINE = 216
440
+
441
+ # @todo Document this constant
442
+ RPL_STATSYLINE = 218
443
+
444
+ # @todo Document this constant
445
+ RPL_ENDOFSTATS = 219
446
+
447
+ # @todo Document this constant
448
+ RPL_STATSLLINE = 241
449
+
450
+ # @todo Document this constant
451
+ RPL_STATSUPTIME = 242
452
+
453
+ # @todo Document this constant
454
+ RPL_STATSOLINE = 243
455
+
456
+ # @todo Document this constant
457
+ RPL_STATSHLINE = 244
458
+
459
+ # To answer a query about a client's own mode, RPL_UMODEIS is sent
460
+ # back.
461
+ RPL_UMODEIS = 221
462
+
463
+ # @todo Document this constant
464
+ RPL_LUSERCLIENT = 251
465
+
466
+ # @todo Document this constant
467
+ RPL_LUSEROP = 252
468
+
469
+ # @todo Document this constant
470
+ RPL_LUSERUNKNOWN = 253
471
+
472
+ # @todo Document this constant
473
+ RPL_LUSERCHANNELS = 254
474
+
475
+ # In processing an LUSERS message, the server sends a set of replies
476
+ # from RPL_LUSERCLIENT, RPL_LUSEROP, RPL_USERUNKNOWN,
477
+ # RPL_LUSERCHANNELS and RPL_LUSERME. When replying, a server must send
478
+ # back RPL_LUSERCLIENT and RPL_LUSERME. The other replies are only
479
+ # sent back if a non-zero count is found for them.
480
+ RPL_LUSERME = 255
481
+
482
+ # @todo Document this constant
483
+ RPL_ADMINME = 256
484
+
485
+ # @todo Document this constant
486
+ RPL_ADMINLOC1 = 257
487
+
488
+ # @todo Document this constant
489
+ RPL_ADMINLOC2 = 258
490
+
491
+ # When replying to an ADMIN message, a server is expected to use
492
+ # replies RLP_ADMINME through to RPL_ADMINEMAIL and provide a text
493
+ # message with each. For RPL_ADMINLOC1 a description of what city,
494
+ # state and country the server is in is expected, followed by details
495
+ # of the university and department (RPL_ADMINLOC2) and finally the
496
+ # administrative contact for the server (an email address here is
497
+ # required) in RPL_ADMINEMAIL.
498
+ RPL_ADMINEMAIL = 259
499
+
500
+ # @todo Document this constant
501
+ RPL_MONONLINE = 730
502
+
503
+ # @todo Document this constant
504
+ RPL_MONOFFLINE = 731
505
+
506
+ # @todo Document this constant
507
+ RPL_MONLIST = 732
508
+
509
+ # @todo Document this constant
510
+ RPL_ENDOFMONLIST = 733
511
+
512
+ # @todo Document this constant
513
+ ERR_MONLISTFULL = 734
514
+
515
+ # @todo Document this constant
516
+ RPL_SASLLOGIN = 900
517
+
518
+ # @todo Document this constant
519
+ RPL_SASLSUCCESS = 903
520
+
521
+ # @todo Document this constant
522
+ RPL_SASLFAILED = 904
523
+
524
+ # @todo Document this constant
525
+ RPL_SASLERROR = 905
526
+
527
+ # @todo Document this constant
528
+ RPL_SASLABORT = 906
529
+
530
+ # @todo Document this constant
531
+ RPL_SASLALREADYAUTH = 907
532
+ end
371
533
  end