grinch 1.0.0

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.
Files changed (99) hide show
  1. checksums.yaml +7 -0
  2. data/.yardopts +1 -0
  3. data/LICENSE +22 -0
  4. data/README.md +180 -0
  5. data/docs/bot_options.md +454 -0
  6. data/docs/changes.md +541 -0
  7. data/docs/common_mistakes.md +60 -0
  8. data/docs/common_tasks.md +57 -0
  9. data/docs/encodings.md +69 -0
  10. data/docs/events.md +273 -0
  11. data/docs/getting_started.md +184 -0
  12. data/docs/logging.md +90 -0
  13. data/docs/migrating.md +267 -0
  14. data/docs/plugins.md +4 -0
  15. data/docs/readme.md +20 -0
  16. data/examples/basic/autovoice.rb +32 -0
  17. data/examples/basic/google.rb +35 -0
  18. data/examples/basic/hello.rb +15 -0
  19. data/examples/basic/join_part.rb +34 -0
  20. data/examples/basic/memo.rb +39 -0
  21. data/examples/basic/msg.rb +16 -0
  22. data/examples/basic/seen.rb +36 -0
  23. data/examples/basic/urban_dict.rb +35 -0
  24. data/examples/basic/url_shorten.rb +35 -0
  25. data/examples/plugins/autovoice.rb +37 -0
  26. data/examples/plugins/custom_prefix.rb +23 -0
  27. data/examples/plugins/dice_roll.rb +38 -0
  28. data/examples/plugins/google.rb +36 -0
  29. data/examples/plugins/hello.rb +22 -0
  30. data/examples/plugins/hooks.rb +36 -0
  31. data/examples/plugins/join_part.rb +42 -0
  32. data/examples/plugins/lambdas.rb +35 -0
  33. data/examples/plugins/last_nick.rb +24 -0
  34. data/examples/plugins/msg.rb +22 -0
  35. data/examples/plugins/multiple_matches.rb +32 -0
  36. data/examples/plugins/own_events.rb +37 -0
  37. data/examples/plugins/seen.rb +45 -0
  38. data/examples/plugins/timer.rb +22 -0
  39. data/examples/plugins/url_shorten.rb +33 -0
  40. data/lib/cinch.rb +5 -0
  41. data/lib/cinch/ban.rb +50 -0
  42. data/lib/cinch/bot.rb +479 -0
  43. data/lib/cinch/cached_list.rb +19 -0
  44. data/lib/cinch/callback.rb +20 -0
  45. data/lib/cinch/channel.rb +463 -0
  46. data/lib/cinch/channel_list.rb +29 -0
  47. data/lib/cinch/configuration.rb +73 -0
  48. data/lib/cinch/configuration/bot.rb +48 -0
  49. data/lib/cinch/configuration/dcc.rb +16 -0
  50. data/lib/cinch/configuration/plugins.rb +41 -0
  51. data/lib/cinch/configuration/sasl.rb +19 -0
  52. data/lib/cinch/configuration/ssl.rb +19 -0
  53. data/lib/cinch/configuration/timeouts.rb +14 -0
  54. data/lib/cinch/constants.rb +533 -0
  55. data/lib/cinch/dcc.rb +12 -0
  56. data/lib/cinch/dcc/dccable_object.rb +37 -0
  57. data/lib/cinch/dcc/incoming.rb +1 -0
  58. data/lib/cinch/dcc/incoming/send.rb +147 -0
  59. data/lib/cinch/dcc/outgoing.rb +1 -0
  60. data/lib/cinch/dcc/outgoing/send.rb +122 -0
  61. data/lib/cinch/exceptions.rb +46 -0
  62. data/lib/cinch/formatting.rb +125 -0
  63. data/lib/cinch/handler.rb +118 -0
  64. data/lib/cinch/handler_list.rb +90 -0
  65. data/lib/cinch/helpers.rb +231 -0
  66. data/lib/cinch/irc.rb +924 -0
  67. data/lib/cinch/isupport.rb +98 -0
  68. data/lib/cinch/log_filter.rb +21 -0
  69. data/lib/cinch/logger.rb +168 -0
  70. data/lib/cinch/logger/formatted_logger.rb +97 -0
  71. data/lib/cinch/logger/zcbot_logger.rb +22 -0
  72. data/lib/cinch/logger_list.rb +85 -0
  73. data/lib/cinch/mask.rb +69 -0
  74. data/lib/cinch/message.rb +392 -0
  75. data/lib/cinch/message_queue.rb +107 -0
  76. data/lib/cinch/mode_parser.rb +76 -0
  77. data/lib/cinch/network.rb +104 -0
  78. data/lib/cinch/open_ended_queue.rb +26 -0
  79. data/lib/cinch/pattern.rb +65 -0
  80. data/lib/cinch/plugin.rb +515 -0
  81. data/lib/cinch/plugin_list.rb +38 -0
  82. data/lib/cinch/rubyext/float.rb +3 -0
  83. data/lib/cinch/rubyext/module.rb +26 -0
  84. data/lib/cinch/rubyext/string.rb +33 -0
  85. data/lib/cinch/sasl.rb +34 -0
  86. data/lib/cinch/sasl/dh_blowfish.rb +71 -0
  87. data/lib/cinch/sasl/diffie_hellman.rb +47 -0
  88. data/lib/cinch/sasl/mechanism.rb +6 -0
  89. data/lib/cinch/sasl/plain.rb +26 -0
  90. data/lib/cinch/syncable.rb +83 -0
  91. data/lib/cinch/target.rb +199 -0
  92. data/lib/cinch/timer.rb +145 -0
  93. data/lib/cinch/user.rb +488 -0
  94. data/lib/cinch/user_list.rb +87 -0
  95. data/lib/cinch/utilities/deprecation.rb +16 -0
  96. data/lib/cinch/utilities/encoding.rb +37 -0
  97. data/lib/cinch/utilities/kernel.rb +13 -0
  98. data/lib/cinch/version.rb +4 -0
  99. metadata +140 -0
@@ -0,0 +1,29 @@
1
+ require "cinch/cached_list"
2
+
3
+ module Cinch
4
+ # @since 2.0.0
5
+ # @version 1.1.0
6
+ # @note In prior versions, this class was called ChannelManager
7
+ class ChannelList < CachedList
8
+ # Finds or creates a channel.
9
+ #
10
+ # @param [String] name name of a channel
11
+ # @return [Channel]
12
+ # @see Helpers#Channel
13
+ def find_ensured(name)
14
+ downcased_name = name.irc_downcase(@bot.irc.isupport["CASEMAPPING"])
15
+ @mutex.synchronize do
16
+ @cache[downcased_name] ||= Channel.new(name, @bot)
17
+ end
18
+ end
19
+
20
+ # Finds a channel.
21
+ #
22
+ # @param [String] name name of a channel
23
+ # @return [Channel, nil]
24
+ def find(name)
25
+ downcased_name = name.irc_downcase(@bot.irc.isupport["CASEMAPPING"])
26
+ @cache[downcased_name]
27
+ end
28
+ end
29
+ end
@@ -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,48 @@
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, :delay_joins, :dcc, :shared, :sasl, :default_logger_level]
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
+ :dcc => Configuration::DCC.new,
41
+ :sasl => Configuration::SASL.new,
42
+ :shared => {},
43
+ :default_logger_level => :debug
44
+ }
45
+ end
46
+ end
47
+ end
48
+ 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,19 @@
1
+ require "cinch/configuration"
2
+ require "cinch/sasl"
3
+
4
+ module Cinch
5
+ class Configuration
6
+ # @since 2.0.0
7
+ class SASL < Configuration
8
+ KnownOptions = [:username, :password, :mechanisms]
9
+
10
+ def self.default_config
11
+ {
12
+ :username => nil,
13
+ :password => nil,
14
+ :mechanisms => [Cinch::SASL::DH_Blowfish, Cinch::SASL::Plain]
15
+ }
16
+ end
17
+ end
18
+ end
19
+ 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,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
@@ -0,0 +1,533 @@
1
+ module Cinch
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
533
+ end