Commit graph

423 commits

Author SHA1 Message Date
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
angelsl
54cb41a616 User idents and hostnames actually can have dots 2016-02-07 16:00:35 +08:00
Aaron Weiss
20338f881f Renamed getter functions to not include get as is common practice. 2016-01-30 12:00:25 -05:00
Aaron Weiss
b6ce088693 Updated examples after Command redesign. 2016-01-30 05:00:16 -05:00
Aaron Weiss
2eb0e63d59 Performed the great Command redesign (fixes #16). 2016-01-30 04:56:32 -05:00
Aaron Weiss
81a807f0a1 Rewrote From<Message> implementation in preparation of Command/Message
redesign.
2016-01-29 15:39:22 -05:00
Aaron Weiss
667a3dade3 Added RAW command. 2016-01-29 13:15:38 -05:00
Aaron Weiss
e7e83c3ab8 Added regression test for nochanlists. 2016-01-19 15:27:58 -05:00
Aaron Weiss
bf9bd3ecb8 Fixed bug in nochanlists from handle_message rewrite. 2016-01-19 15:23:09 -05:00
Aaron Weiss
81518bf244 Rewrote internal message handling in more modern Rust. 2016-01-18 00:18:28 -05:00
Aaron Weiss
8a2ce65e71 Added extract_writer function for use in unit tests. 2016-01-16 12:51:44 -05:00
Aaron Weiss
8113c47842 Fixed test execution. 2016-01-16 11:47:25 -05:00
Aaron Weiss
506fa3d78f Made time a required library dependency. 2016-01-16 11:18:11 -05:00
Aaron Weiss
f34a6ba5cf Fixed implementation of auto-reconnection by updating message sending to
use the write queue.
2016-01-16 11:15:10 -05:00
Aaron Weiss
3dc15449a8 Implemented ping-sending on inactivity. 2016-01-15 12:37:16 -05:00