Commit graph

688 commits

Author SHA1 Message Date
jesopo
a9b106c6be Don't try to .decode non-html things, default iso-lat-1 for non-html too 2019-09-09 16:17:26 +01:00
jesopo
b83f5d9e30 add flag to disable encoding detection 2019-09-09 14:59:08 +01:00
jesopo
5ef2b7af27 'str.split' -> 's.split' 2019-09-09 14:53:11 +01:00
jesopo
1df82c1cb2 still default to iso-latin-1 if no on-page or in-header content-type is present 2019-09-09 14:48:26 +01:00
jesopo
0a67659637 only look for <meta>-related tags when there are meta tags 2019-09-09 14:39:19 +01:00
jesopo
0a1077c5cd add explicit None return for _find_encoding (mypy) 2019-09-09 14:25:01 +01:00
jesopo
ff9c82bf67 change utils.http.request to best-effort detect on-page encoding
closes #113
2019-09-09 14:11:18 +01:00
jesopo
dadefeb8f3 remove try-rejoin (on 477) logic. will move to a module later 2019-09-07 15:21:35 +01:00
jesopo
d973b547e1 add a create flag to IRCChannels.get_id() to optionally not create new ids 2019-09-05 14:13:58 +01:00
jesopo
d7ae182428 cache when a setting isn't set but don't cache "default" value 2019-09-04 15:26:36 +01:00
jesopo
473c2723e7 only cache get_setting value when it's not the default value 2019-09-04 15:24:50 +01:00
jesopo
007bb78d30 make utils.from_pretty_time() format much stricter 2019-09-04 11:22:56 +01:00
jesopo
397cfa8e7e correctly qualify DeadlineExceededException namespace 2019-09-03 14:54:59 +01:00
jesopo
b7b2f31c1c use utils.deadline() in utils.http.request, not raw sigalrm 2019-09-02 15:50:21 +01:00
jesopo
d42d694e64 move deadline alarm time check inside try/finally 2019-09-02 15:50:12 +01:00
jesopo
a160148c2f actually prune non-loadable modules before doing dependency checks 2019-09-02 15:46:31 +01:00
jesopo
43a7b7d949 add basic caching logic for channel settings 2019-09-02 14:07:39 +01:00
jesopo
7959f1ab88 change Cache.py to be key:value 2019-09-02 14:07:26 +01:00
jesopo
9cc1ee98eb Pass the content of a webpage to HTTPParsingException 2019-09-02 13:27:44 +01:00
jesopo
408b89aeb7 use \S+ for url regex (for non-ascii chars), use url_sanitize to catch <> 2019-09-02 13:25:48 +01:00
jesopo
9e43ea1599 add per-user fediverse setting 2019-09-02 08:51:56 +01:00
jesopo
19d8f0b497 store and expose reconnection timers on IRCBot.reconnections 2019-09-01 08:38:22 +01:00
jesopo
6a068777d6 v1.11.1 release 2019-08-30 19:10:17 +01:00
jesopo
722d6418c8 switch to using signal.setitimer so we can restore previous timer 2019-08-30 18:36:48 +01:00
jesopo
a57a06b1cc switch utils.deadline to a context manager 2019-08-30 18:13:12 +01:00
jesopo
e97e3c8f30 add utils.deadline(func, seconds) to put hard limits on code exec time 2019-08-30 17:17:03 +01:00
jesopo
4bfb4c3200 Add IntRangeSetting, reorder OptionsSetting arg order 2019-08-30 14:40:54 +01:00
jesopo
2c812ccaaa Logging.BitBotFormatter no longer uses the format it's given (always iso8601) 2019-08-30 13:46:21 +01:00
jesopo
58a4fd7e74 round microseconds up to a whole number and zero-pad to 3 chars 2019-08-30 13:46:00 +01:00
jesopo
d3ed08e336 Don't use 'Z' for "utc timezone" - actually parse timezone out of datetimes 2019-08-30 13:25:19 +01:00
jesopo
b037c3076f v1.11.0 release 2019-08-15 13:45:54 +01:00
jesopo
61eeba0cb9 should only return a BufferLineMatch when we actually match 2019-08-15 13:45:04 +01:00
jesopo
195cb66e26 Update CHANGELOG.md, bump version to v1.11.0-rc3 2019-08-14 15:17:01 +01:00
jesopo
814236915b forgot to update IRCBot.VERSION to v1.11.0-rc2 2019-08-13 15:11:43 +01:00
jesopo
03c7e8f066 return matching string from buffer.find() as most uses were redundantly regexing 2019-08-13 13:48:03 +01:00
jesopo
0f4a4d04a1 v1.11.0-rc1 release 2019-08-09 15:02:10 +01:00
jesopo
b6361ba4e3 Remove extraneous space 2019-08-07 14:00:56 +01:00
jesopo
20042edfd9 Allow bypass of content-type check in utils.http.request 2019-08-05 15:41:02 +01:00
jesopo
d093027431 not all HTTP responses have content-type 2019-08-02 17:33:16 +01:00
jesopo
dd8b276b35 pull priority out of kwargs in _hook 2019-07-30 15:24:13 +01:00
jesopo
27a6078f20 Revert "hook priority position should default to 0, not end"
This reverts commit ff0cc59507.
2019-07-30 15:23:13 +01:00
jesopo
5ffe2941e8 Revert "we should be checking if the new hook has a higher priority"
This reverts commit b145e664e1.
2019-07-30 15:23:05 +01:00
jesopo
b145e664e1 we should be checking if the new hook has a higher priority 2019-07-30 15:12:29 +01:00
jesopo
ff0cc59507 hook priority position should default to 0, not end 2019-07-30 15:09:34 +01:00
jesopo
793fc94ea3 source should have ':' appended 2019-07-28 20:55:54 +01:00
jesopo
ad8f66c00e Remove debug print 2019-07-28 18:14:44 +01:00
jesopo
163e979f95 move socket creation to it's own function, send event just prior to .connect 2019-07-28 18:07:23 +01:00
jesopo
9827feeabd 'name' -> 'key' (copypaste fail) 2019-07-28 18:07:01 +01:00
jesopo
25b507e80c Refactor hook kwargs to be stored as a list of tuples to support key duplicates
closes #108
2019-07-28 12:35:04 +01:00
jesopo
77dfc76591 switch to function/module magic being a single object 2019-07-26 11:58:06 +01:00