Aaron Weiss
9b99677391
Changed error message for NoUsableNick.
2018-02-12 20:30:02 +01:00
Emīls Piņķis
a8cdf1ecfc
Add error type for when there are no valid nicks
2018-02-12 19:16:00 +00:00
Aaron Weiss
e847cda40a
IrcTransport::poll_complete now polls the ping timer ( fixes #115 ).
2018-02-08 02:21:08 +01:00
Aaron Weiss
decfd0b9bc
Noted inaccuracies of the is_error function for Response.
2018-02-07 12:13:43 +01:00
Aaron Weiss
31f8c692b6
Added some more information to the response docs, and some extra common response codes.
2018-02-07 12:08:59 +01:00
Aaron Weiss
4c26dfc3cd
Reverted a7ae091
because it caused a regression ( resolves #112 ).
2018-01-29 14:04:41 +01:00
Aaron Weiss
ea2c05f9fc
Removed irc::client::server (which should've been done before, woops).
2018-01-29 14:01:44 +01:00
Aaron Weiss
bc8f7342dd
Added missing call to IrcReactor::run
in the reactor docs.
2018-01-28 14:04:21 +01:00
Aaron Weiss
59f426ac8d
Cleaned up tests and documentation after the big renaming.
2018-01-28 03:19:05 +01:00
Aaron Weiss
87b84fdeb9
Changed naming scheme from server to client ( resolves #46 ).
2018-01-28 02:16:50 +01:00
Aaron Weiss
9c574b00c0
Moved prelude module into its own file.
2018-01-28 02:02:45 +01:00
Aaron Weiss
d6786936fa
Fixed the code that shouldn't have worked without AsciiExt.
2018-01-28 01:59:47 +01:00
Aaron Weiss
e4d441695e
Merge branch 'use-failure' into develop
2018-01-28 01:16:38 +01:00
Aaron Weiss
afe3558880
Cleaned up a bunch of code with clippy.
2018-01-28 01:14:55 +01:00
Aaron Weiss
5266e4098d
Refactored the whole crate to use failure.
2018-01-28 00:52:11 +01:00
Aaron Weiss
8782f66de4
Merge branch 'irc-reactor' into develop
2018-01-27 21:19:38 +01:00
Aaron Weiss
2d28a71c6c
Removed some trailing whitespace in reactor docs.
2018-01-27 20:59:41 +01:00
Aaron Weiss
de6e5f331d
Added debug derivations for irc::client types ( fixes #104 ).
2018-01-27 20:39:35 +01:00
Aaron Weiss
ce158fc612
Made unspecified server or nickname into errors instead of simply panics.
2018-01-27 20:26:56 +01:00
Aaron Weiss
67cca339a7
Eliminated a panic that can occur when using IrcServerFuture, and recommend using IrcReactor instead.
2018-01-27 19:50:48 +01:00
Aaron Weiss
fd4e5706eb
Added more documentation for IrcReactor, and made new_future internal-only.
2018-01-27 19:26:48 +01:00
Aaron Weiss
ff9eba2722
Made some of the reactor API more generic.
2018-01-27 15:35:44 +01:00
Aaron Weiss
982d1b5a0d
Added a function to access the tokio reactor handle in IrcReactor.
2018-01-27 15:18:15 +01:00
Aaron Weiss
e62d4a97aa
Added a first cut (without examples) of documentation for IrcReactor.
2018-01-24 14:51:41 +01:00
Aaron Weiss
fbe17978fc
Removed trailing whitespace in documentation.
2018-01-24 12:21:03 +01:00
Aaron Weiss
ab16c865bb
Added a function to spawn arbitrary futures on a reactor (i.e. opt-in "full" tokio support).
2018-01-24 12:13:33 +01:00
Aaron Weiss
fc4b4cad7f
Reorganized imports in reactor.rs.
2018-01-08 23:54:06 -05:00
Aaron Weiss
a7ae091ff5
Moved connection creation sooner for better error handling in IrcServer::from_config.
2018-01-08 23:19:29 -05:00
Aaron Weiss
bbc6b0244d
Added an experimental reactor API to hide tokio.
2018-01-08 21:52:56 -05:00
Aaron Weiss
40ff295821
Fixed parsing bug allowing messages without arguments to parse correctly.
2018-01-06 13:31:08 -05:00
Aaron Weiss
452645a56f
Fixed compilation error with no-default-features.
2018-01-01 23:07:10 -05:00
Aaron Weiss
a0d0d3e249
Cleaned up a bunch of code with clippy.
2018-01-01 22:25:25 -05:00
Aaron Weiss
68666aef09
Made a stylistic change to the new message throttling code.
2018-01-01 21:52:23 -05:00
Aaron Weiss
70ff2ec992
Changed throttling window to be properly rolling.
2018-01-01 21:47:59 -05:00
Aaron Weiss
16292fcc2c
Improved documentation for message throttling configuration.
2018-01-01 21:47:28 -05:00
Aaron Weiss
c7772c0479
Changed message throttling to use a rolling window.
2018-01-01 21:18:33 -05:00
Aaron Weiss
321bbec7ad
Changed message parsing to accept more line ending options.
2017-12-30 12:21:20 -05:00
Aaron Weiss
2564e6b060
Added a bunch of detail about the high-level client API to the prelude.
2017-12-24 21:50:43 -05:00
Aaron Weiss
f78909f74d
Improved documentation for the top-level library and Message struct.
2017-12-24 21:23:19 -05:00
Aaron Weiss
6348ad0567
Fixed broken links in some documentation.
2017-12-24 21:22:51 -05:00
Aaron Weiss
dcac92084f
Improved the documentation for irc::proto::message a bit.
2017-12-13 20:38:04 +01:00
Aaron Weiss
4ec2212dbd
Implemented tag output in Message::to_string() which apparently was _still_ a TODO.
2017-12-13 20:33:26 +01:00
Aaron Weiss
f6588cb980
Removed server module (refining project scope), and fixed up README.
2017-12-13 20:31:28 +01:00
Aaron Weiss
7625c364a6
Added logging support via the log crate.
2017-12-12 14:02:45 +01:00
Aaron Weiss
dc55d08996
Fixed some typographical errors in new documentation.
2017-11-16 17:26:46 +01:00
Aaron Weiss
899accaa2f
Improved the documentation for irc::client::server.
2017-11-16 15:54:08 +01:00
Frederik B
98371429b6
Add usermode +x and channelmode +r
...
This commit adds the usermode +x (masked hostname) and the channelmode +r (entry for users registered with NickServ only)
2017-11-07 15:24:55 +01:00
Jokler
9ec7356d10
Improved error-handling in config ( fixes #98 )
2017-10-17 00:38:59 +02:00
Aaron Weiss
c992fbdf77
Fixed deprecation warnings.
2017-10-02 17:00:46 +02:00
Aaron Weiss
99347f536c
Improved documentation on IrcTransport.
2017-08-15 14:43:30 -04:00
Aaron Weiss
e220e90c58
Added the ability to create a new IrcServer without spawning a thread.
2017-08-15 14:00:32 -04:00
Aaron Weiss
20e7f2fdf5
Reordered Config for TOML compatibility and improved error handling for saves/loads.
2017-08-04 20:23:07 -04:00
Aaron Weiss
c749146d5c
Added support for toml and yaml configurations.
2017-06-29 00:31:27 -07:00
Aaron Weiss
a0f43cb80b
Added support for message throttling.
2017-06-28 23:07:02 -07:00
Aaron Weiss
ccefda229b
Switched from time to chrono.
2017-06-28 22:24:23 -07:00
Aaron Weiss
f0fa03e70a
Updated documentation for ping_time and ping_timeout.
2017-06-28 20:44:22 -07:00
Aaron Weiss
4d3f4c556a
Implemented ping sending inside of the transport.
2017-06-28 17:48:00 -07:00
Aaron Weiss
07614fb26f
Changed LineCodec to use extend in encode ( fixes #92 ).
2017-06-27 14:57:25 -07:00
Aaron Weiss
8fa6f85001
Changed outgoing future to panic on error (since the code currently does
...
that anyway).
2017-06-27 14:26:04 -07:00
Aaron Weiss
7712a5536b
Readded current_nickname to IrcServer interface ( fixes #91 ).
2017-06-25 19:36:38 -07:00
Aaron Weiss
c841e2cca9
Changed server tests to using for_each_incoming.
2017-06-25 05:58:13 -04:00
Aaron Weiss
1c0ccd11a9
Updated docs for ping_time and ping_timeout.
2017-06-25 05:45:30 -04:00
Aaron Weiss
196d6425bd
Purged try! from code (replaced with ?).
2017-06-25 05:06:35 -04:00
Aaron Weiss
52035bd31e
Added EachIncomingExt to prelude.
2017-06-25 05:02:27 -04:00
Aaron Weiss
b95ed76088
Extended for_each_incoming to all IRC streams, and added the error to
...
the return type.
2017-06-25 04:58:08 -04:00
Aaron Weiss
cfafb39ed9
Added a response_target helper function (suggested in #44 ).
2017-06-25 04:47:45 -04:00
Aaron Weiss
bd5253016e
Added ChannelExt to prelude.
2017-06-25 04:47:09 -04:00
Aaron Weiss
30468870bf
Refactored ChannelExt into its own module.
2017-06-25 04:46:20 -04:00
Aaron Weiss
a7a20efb0c
Fixed docs for JOIN ( fixes #90 ).
2017-06-25 04:23:56 -04:00
Aaron Weiss
1c98b4a5ea
Added documentation and a better error message for second calls to
...
stream().
2017-06-24 22:18:16 -04:00
Aaron Weiss
41632b10af
Both sides of the transport now error on ping timeout.
2017-06-22 17:33:29 -04:00
Aaron Weiss
4d9d015f84
Fixed CTCP VERSION test.
2017-06-22 16:07:52 -04:00
Aaron Weiss
1030f51b46
Improved top-level module documentation.
2017-06-22 16:04:09 -04:00
Aaron Weiss
bfb14c0446
Fixed bug with response documentation.
2017-06-22 16:02:03 -04:00
Aaron Weiss
2055603a5d
Changed CTCP VERSION to include the real version number by default.
2017-06-22 15:04:27 -04:00
Aaron Weiss
ec8fdeb2e9
Reorganized imports into a consistent style.
2017-06-22 14:15:55 -04:00
Aaron Weiss
eecbe1630c
Refactored Mode API into its own module and added it to prelude.
2017-06-22 14:15:55 -04:00
Aaron Weiss
d9f4f82051
Implemented new Mode API ( fixes #48 ).
2017-06-22 13:59:18 -04:00
Aaron Weiss
54326e0047
Reformatted conn and transport.
2017-06-22 10:46:40 -04:00
Aaron Weiss
2035739aa5
Added RPL_ISUPPORT, and moved RPL_BOUNCE. Fixes #87 .
2017-06-22 10:01:51 -04:00
Aaron Weiss
89b3c7b29d
Changed library to accept case insensitive commands ( fixes #45 ).
2017-06-21 23:55:17 -04:00
Aaron Weiss
536521e349
Fixed bug with SSL domain verification.
2017-06-21 23:35:00 -04:00
Aaron Weiss
b277db71e0
Fixed test compilation.
2017-06-21 23:24:11 -04:00
Aaron Weiss
254f5bb048
Added ability to specify SSL certificate in DER format ( fixes #67 ).
2017-06-21 23:21:03 -04:00
Aaron Weiss
c0af567258
Cleaned up imports and prelude.
2017-06-21 22:14:15 -04:00
Aaron Weiss
8c9a1aca2c
Added for_each_incoming helper to Server.
2017-06-21 22:07:53 -04:00
Aaron Weiss
514a08d838
Fixed compilation for no default features.
2017-06-21 21:52:28 -04:00
Aaron Weiss
86e224b8aa
Fixed unit tests for async changes.
2017-06-21 21:50:38 -04:00
Aaron Weiss
77d44a5055
Added two config fields for testing purposes.
2017-06-21 19:19:58 -04:00
Aaron Weiss
2087e83e79
Removed tokio-service dependency, added tokio-mockstream.
2017-06-21 19:07:59 -04:00
Aaron Weiss
3369ef5ff2
Cleaned up code and added documentation.
2017-06-21 17:15:30 -04:00
Aaron Weiss
073b82feec
Replaced old conn.rs with async.rs.
2017-06-21 16:55:37 -04:00
Aaron Weiss
c363dc7837
Migrated real IrcServer API to be async based on experiment.
2017-06-21 16:53:28 -04:00
Aaron Weiss
6118516951
Fixed bug in line protocol.
2017-06-21 16:50:54 -04:00
Aaron Weiss
7d3e923de8
Added a first real cut at async.
2017-06-21 13:18:22 -04:00
Aaron Weiss
cc1aa5717e
Migrated to using error_chain.
2017-06-20 14:54:06 -04:00
Aaron Weiss
1ca609331c
Added reexports to the proto module.
2017-06-20 11:48:42 -04:00
Aaron Weiss
e7440d9b23
Made some small assorted changes.
2017-06-20 11:48:13 -04:00
Aaron Weiss
1c1e4af311
Updated tests to compile.
2017-06-19 14:42:27 -04:00
Aaron Weiss
cf3ee671ed
Merge branch 'master' into async
2017-06-19 14:33:02 -04:00
Aaron Weiss
e5e33e9069
Fixed bug when compiling with no-default-features.
2017-06-19 14:19:57 -04:00
Manish Goregaokar
02f9968b0c
Update OpenSSL to 0.9.
2017-06-19 14:11:57 -04:00
Aaron Weiss
f0f0b95038
Ran rustfmt on all the code.
2017-06-19 13:59:26 -04:00
Aaron Weiss
388628d62a
Applied a bunch of clippy lints.
2017-06-19 13:46:01 -04:00
Torbjörn Lönnemark
1c84b699d4
Add support for RPL_TOPICWHOTIME (numeric 333)
2017-06-15 21:20:17 +02:00
Torbjörn Lönnemark
e33248f043
Replace rustc-serialize with serde
...
rustc-serialize is deprecated.
Fixes #84 .
2017-06-14 22:20:31 +02:00
TheMightyBuzzard
c6efd4d9f0
Properly remove users from channels on quit
2017-06-06 04:37:25 -05:00
Aaron Weiss
9a2222d802
Updated Tokio protocol code.
2017-05-26 14:09:09 +02:00
Aaron Weiss
38c7ed2c71
Changed Server API to provide channel lists, and fixed channel tracking
...
to work with user PARTs.
2017-05-25 17:27:00 +02:00
Aaron Weiss
f3fb23d755
Added input sanitization to prevent newline injection ( fixes #80 ).
2017-05-02 19:47:16 -04:00
TheMightyBuzzard
9706d93968
track nick changes
...
Client did not track nick changes. This solves that, although admittedly in a rather inefficient way.
2017-04-11 07:29:33 -05:00
Perl I. Weird
2da5f4defc
Allow all of SSL2, SSL3 and TLS1 connections
2017-04-01 13:22:25 -07:00
Dominik Miedziński
fcb0c1da64
Use CTCP VERSION and SOURCE replies from Config
2017-03-22 22:06:43 +01:00
Aaron Weiss
6a0f2a184f
Merge branch 'master' into async
2017-03-15 12:44:46 -04:00
Aaron Weiss
fbeeaed874
Changed implementation of socket_addr on Config.
2017-03-15 12:42:15 -04:00
Aaron Weiss
c402371450
Merge pull request #75 from miedzinski/fix-warnings
...
Remove unused imports and fix broken test
2017-03-15 12:35:27 -04:00
Dominik Miedziński
59b79c06cc
Remove unused imports and fix broken test
2017-03-15 17:28:07 +01:00
Dominik Miedziński
f4f49c6dd3
Ignore CTCP PINGs without timestamps
2017-03-15 17:11:19 +01:00
Aaron Weiss
342a11aba4
Added dependency on futures.
2017-01-15 18:10:35 -05:00
Aaron Weiss
abf981c4ad
Added dependency for native-tls.
2017-01-15 18:08:03 -05:00
Aaron Weiss
db140baf9e
Added dependence on tokio-tls.
2017-01-15 17:50:56 -05:00
Aaron Weiss
d9fc586b8c
Added socket_addr() helper to Config.
2017-01-15 17:32:41 -05:00
Aaron Weiss
1f3b3d64b5
IrcCodec is no longer paramterized by inner codec type.
2017-01-15 17:06:43 -05:00
Aaron Weiss
a6303d4858
Removed dependence on tokio-proto.
2017-01-15 17:02:37 -05:00
Aaron Weiss
843b7ba3c0
Implemented IrcCodec and IrcProto using LineCodec.
2017-01-15 16:34:59 -05:00
Aaron Weiss
7003270834
Removed parameterization of LineCodec on encoding.
2017-01-15 16:34:37 -05:00
Aaron Weiss
59e219f466
Implemented a line-delimited codec.
2017-01-15 14:28:12 -05:00
Aaron Weiss
880870770e
Moved protocol-related stuff to new proto module.
2017-01-15 13:41:16 -05:00
Aaron Weiss
1fd5668def
Removed optional encoding feature, forcing encoding always. Temporarily
...
purged SSL support.
2017-01-15 13:31:50 -05:00
Aaron Weiss
d13a28ff98
Added send_part to ServerExt.
2016-12-18 16:25:24 -05:00
Dominik Miedziński
e13f94e0c2
Rejoin all channels on reconnect ( fixes #55 )
2016-09-24 23:22:20 +02:00
Aaron Weiss
5b8f320050
Implemented channel keys for autojoined channels ( fixes #51 ).
2016-07-05 16:21:21 -04:00
ChanMin Kim
bba8648252
Changed ping timeout logic in ping thread
...
Previously, ping thread might enter infinite reconnect loop.
Consider the following scenario.
1. If at least one ping is sent, last_ping_data is updated.
2. Then there are many activities, so should_ping() becomes false.
3. After some seconds, now().to_timespec() - time > strong.ping_timeout_duration() is satisfied.
4. reconnect()
5. But should_ping() is still false.
6. The condition is still satisfied, so reconnect() again and again.
I made several changes.
Followings are the changes in the code
- Handle PONG message from server.
- Add `waiting_pong_reply' flag in the state. The flag is set if ping is
sent but the corresponding pong did not arrive yet.
- Ping thread checks ping timeout in correct way.
- Sleeping duration for ping is now based on idle time.
- Initialize ping related fields when `reconnect()' is called.
Hopefully, this commit may be related to issue #50 .
2016-07-05 06:55:30 +09:00
Geordon Worley
baef34f947
make tag members public
2016-06-19 00:37:58 -04:00
Aaron Weiss
e450621a57
Removed unnecessary parentheses.
2016-04-11 23:00:50 -04:00
Aaron Weiss
85e30e6f9f
Added a bounds check on handle_ctcp.
2016-04-11 22:59:20 -04:00
Aaron Weiss
fcc5c64826
Command parsing now parses into raw, rather than producing an error.
2016-04-02 13:50:27 -04:00
Aaron Weiss
863946ecb8
Implemented Display for Message.
2016-03-17 21:39:58 -04:00
Aaron Weiss
e4495940fc
Made a whole lot of linting changes to improve code.
...
Small API changes:
1. Message::into_string -> Message:to_string
2. NetStream::UnsecuredTcpStream -> NetStream::Unsecured
3. NetStream::SslTcpStream -> NetStream::Ssl
2016-03-17 21:35:35 -04:00
angelsl
46f9136c93
Write directly from threads (through a mutex) instead of using a writing thread
...
The writing thread now becomes a simple pinging thread. The pinging
thread will exit when the weak reference to the ServerState can no
longer be upgraded i.e. when the ServerState has been dropped i.e. when
the IrcServer has been dropped.
This fixes #43 as well.
This is the first in a series of changes that will reduce allocations by
the library.
2016-02-17 23:25:01 -05:00
Aaron Weiss
7d7e09fa8e
Removed incomplete doc comment.
2016-02-12 11:30:55 -05:00
Aaron Weiss
e7b5d5e9d1
Made some formatting changes for readability.
2016-02-12 11:21:00 -05:00
Aaron Weiss
33123f4695
Fixed bug that caused user modes to be sent incorrectly when an
...
alternate nickname was in use.
2016-02-10 15:46:42 -05:00
Aaron Weiss
6d5b534628
Fixed bug in MODE parsing.
2016-02-10 12:31:52 -05:00
Aaron Weiss
52027f7834
Fixed compilation of test cases and made API changes for testing where
...
necessary.
2016-02-10 12:00:25 -05:00
Aaron Weiss
75bcc42af5
Added written to Connection interface and eliminated code duplication in Connection implementations.
2016-02-10 00:32:00 -05:00
Aaron Weiss
3314c93c3e
Implemented a major redesign to simplify API and eliminate
...
overly-complicated generics usage.
2016-02-10 00:15:08 -05:00
angelsl
5f20e715fd
Add NickServ GHOST functionality
2016-02-09 18:41:52 +08:00
Aaron Weiss
2cf0b26dca
Cleaned up new comments on source_nickname.
2016-02-07 11:33:45 -05:00
angelsl
022b4af86c
Fix Message::source_nickname
2016-02-07 16:01:05 +08:00