Commit Graph

438 Commits

Author SHA1 Message Date
Shiz f223f15575 Refactor ping timeout handler to not send client PINGs.
Instead rely on the server to send PING commands, in accordance with
RFC1459.
2014-02-21 18:29:58 +01:00
Shiz 3371fb49c9 Change disconnect() to disconnect(expected=True), remove _has_quit. 2014-02-21 18:25:05 +01:00
Shiz 71b8870522 Don't reset attributes twice on disconnect. 2014-02-21 04:55:17 +01:00
Shiz 65604e20da Merge branch 'master' of github:Shizmob/pydle 2014-02-21 04:52:24 +01:00
Shiz da4fe7a250 Added kick API. 2014-02-21 04:51:28 +01:00
Shiz d04254e417 Refactor IRC exception constructors. 2014-02-21 04:50:04 +01:00
Tony Young be4c8a4c45 Shorten reconnect delays and reset attributes on disconnect. 2014-02-21 10:43:33 +13:00
Tony Young 39df558e63 Check if futures exist in parallel() so we don't wait infinitely. 2014-02-21 00:42:04 +13:00
Tony Young 807242bd2c Always return a Future from @coroutine. 2014-02-20 23:25:25 +13:00
Tony Young ebc8f88c04 Allow non-generator factories to be decorated with @coroutine.
This is a no-op.
2014-02-20 23:00:50 +13:00
Tony Young 5491fa8a34 Fix broken _destroy_channel and KICK support. 2014-02-20 21:22:23 +13:00
Shiz 146c7deb8e Fix variable naming in features.account.
I'm a nitpicking bastard.
2014-02-20 03:42:14 +01:00
Tony Young b86fb45f5a Remove unnecessary code for dealing with SIGPIPE.
Python installs a small number of signal handlers by default: SIGPIPE
is ignored (so write errors on pipes and sockets can be reported as
ordinary Python exceptions)...
2014-02-20 15:25:25 +13:00
Tony Young 954ae304c7 Remember to return the Future from AccountSupport.whois() 2014-02-20 15:08:58 +13:00
Shiz 4fab60ffa1 Properly parse PONG response. 2014-02-20 02:15:37 +01:00
Shiz bf2781a10b Don't update hostname/realname from server. 2014-02-20 02:12:50 +01:00
Shiz 4c58bb58b4 Don't remove handlers if none are present. 2014-02-20 01:56:52 +01:00
Shiz 255946dab6 Reorder features. 2014-02-20 01:55:06 +01:00
Shiz 8439d2d24b Update documentation on recent changes. 2014-02-20 01:51:28 +01:00
Shiz dab720d422 Create on_user_online/on_user_offline callbacks for MONITOR extension. 2014-02-20 01:50:55 +01:00
Shiz 1caf804fa1 Also set registration completed on missing MOTD. 2014-02-20 01:50:25 +01:00
Shiz 87541cf230 Change Client.mode()/Client.topic() to Client.set_mode()/Client.set_topic(). 2014-02-20 01:50:00 +01:00
Shiz 6734bf7e99 Change nickname setting through attribute to Client.set_nickname(). 2014-02-20 01:49:27 +01:00
Shiz 6628e5d74e Move some features from rfc1459 to pydle.features.account. 2014-02-20 01:48:33 +01:00
Shiz ccad21370b Rename UNREGISTERED_NICKNAME to DEFAULT_NICKNAME. 2014-02-20 01:45:38 +01:00
Shiz 95e3d36fc0 Unschedule ping checking on disconnect. 2014-02-19 13:50:01 +01:00
Shiz c52c5cce90 Implement client-side ping timeout.
This fixes #13.
2014-02-19 13:34:37 +01:00
Shiz 923974de94 Fix crash when scheduling periodics. 2014-02-19 13:33:15 +01:00
Shiz cd55afad60 Handle socket error conditions more gracefully. 2014-02-19 00:49:56 +01:00
Shiz 37dd569f26 Make EventLoop set a Future exception on timeout. 2014-02-18 23:57:18 +01:00
Shiz 6295843fb2 Add timeout for futures scheduled using EventLoop.
Callbacks for futures scheduled using EventLoop.on_future will now have
a timeout specified by EventLoop.future_timeout (in seconds). If the
future does not resolve within the given timeout, its result will be set
to async.FutureTimeout and the callback will be called.

This fixes #18.
2014-02-18 23:52:13 +01:00
Shiz cb87057ba6 Remove leftover redundant attribute. 2014-02-18 23:13:10 +01:00
Shiz 95f35a365a Merge branch 'master' of github:Shizmob/pydle 2014-02-18 23:11:37 +01:00
Shiz cfe4d02af9 Make EventLoop.schedule_* functions always return an unschedule handle.
schedule_in() and schedule_periodically() will now always return handles
that can be passed to unschedule(), even when not ran from the event
loop thread. In addition, calling unschedule() with the handle for
periodical callbacks will now also work after the first call of that
callback. The opaque IDs are currently implemented as a simple
monotonically increasing number.

This fixes #19.
2014-02-18 23:10:42 +01:00
Tony Young f32faa9058 Correctly raise KeyError when a non-string is found in NormalizingDict. 2014-02-18 00:55:08 +13:00
Shiz f0a7425d73 Sorry Yuki`N. 2014-02-17 10:59:47 +01:00
Shiz b2cd886673 Robustify socket.send and clean up pydle.connection comments. 2014-02-17 00:39:43 +01:00
Shiz fa939e2f79 Rename NormalizedDict to NormalizingDict. 2014-02-16 19:58:39 +01:00
Shiz a94501a747 Make users and channel dictionary normalize key entries. 2014-02-16 18:53:18 +01:00
Shiz 9e35d669e6 Fix typo. 2014-02-16 12:05:58 +01:00
Shiz 65fc70002e Merge branch 'master' of github:Shizmob/pydle 2014-02-16 12:03:49 +01:00
Shiz 59c8aae554 Don't add MSG_NOSIGNAL flag to send() on TLS sockets. 2014-02-16 12:03:18 +01:00
Tony Young 43ff37f668 Merge branch 'master' of github.com:Shizmob/pydle 2014-02-16 19:03:23 +13:00
Tony Young e30cc7fd2d Correctly reschedule periodic tasks. 2014-02-16 19:02:37 +13:00
Shiz 0693b1bb41 Convert input time properly in callback scheduling. 2014-02-16 03:04:50 +01:00
Shiz 71684ba0bd Repeat previous mistakes. 2014-02-16 01:55:04 +01:00
Shiz ea6d567dc8 Hi what are ints and why do I call them 2014-02-16 01:53:43 +01:00
Shiz dcdba865bb Hi what are functions and how do I call them 2014-02-16 01:52:33 +01:00
Shiz 44f094760e Make SASL use delayed scheduling instead of threading.Timer. 2014-02-16 01:50:25 +01:00
Shiz 1b7a0c3e82 Make EventLoop scheduling return a handle to unschedule the call. 2014-02-16 01:47:05 +01:00