Commit Graph

5883 Commits

Author SHA1 Message Date
Valentin Lorentz
74f86654b1 Remove fallbacks for old Python versions. 2022-01-01 18:11:36 +01:00
Valentin Lorentz
7fade191c3 Google: Update suggestions in the deprecation warning
1. DDG is now built-in
2. GoogleCSE is actually limited to site-specific search
2021-12-23 20:09:49 +01:00
Valentin Lorentz
caa5aa3d84 Config: Replace inconsistent terminology 2021-12-19 21:11:26 +01:00
Valentin Lorentz
e223b507dd utils.time: Add support for timezones without a slash.
eg. UTC, CET, ...
2021-12-07 23:30:16 +01:00
Valentin Lorentz
ed9dffdd7f supybot-plugin-doc: Remove extra space + regenerate all READMEs. 2021-12-04 03:19:12 +01:00
Valentin Lorentz
828fff9cc0 supybot-plugin-doc: Add missing newlines + regenerate all READMEs. 2021-12-04 02:50:28 +01:00
Valentin Lorentz
f1824fc7db Config: Fix crash when reseting registry.Pattern 2021-12-03 17:28:05 +01:00
Valentin Lorentz
baa8cda814 Fix bypassed cache invalidation checks, causing '@config reload' to be partially ignored
`registry.Value.__call__()` is a wrapper around access to
`registry.Value.value`, that checks if the value was set before the latest
call to `registry.open_registry`; and updates the `value` if needed.

When accessing `registry.Value.value` directly, this cache can't be
invalidated, causing the old value to still be used, until the next call
to `registry.Value.__call__()`.
2021-12-03 16:56:06 +01:00
Valentin Lorentz
c0d033ff84 Math: Fix crash in @convert on small/large single-digit numbers
str() converts them to the exponent notation, which makes split('.')[1]
crash, since there is no decimal part in the exponent notation when there
is a single significant digit.
2021-11-28 18:00:58 +01:00
Valentin Lorentz
2d5c80736d MessageParser: Fix crash (and unexpected behavior) when matching backslashes
Closes GH-1497.
2021-11-26 00:55:44 +01:00
Valentin Lorentz
63a97fc147 Owner: Ignore commands when they are in a chathistory batch. 2021-11-18 13:17:39 +01:00
Valentin Lorentz
5aefd6395f Time: Fix error handling in @tztime. 2021-11-09 22:33:23 +01:00
Valentin Lorentz
8326d6ef7f Fediverse and Poll: Run Black 2021-11-09 22:33:12 +01:00
Valentin Lorentz
8b26b675ba Use stdlib instead of pytz on Python >= 3.9
Python 3.9 introduced the zoneinfo module, which provides the only
feature we used pytz for (getting a datetime.tzinfo object from
an IANA timezone id); so let's use it instead of a third-party
dependency.
2021-11-08 21:46:48 +01:00
Valentin Lorentz
ce7e4b754c Replace deprecated unittest function calls. 2021-11-08 21:29:59 +01:00
James Lu
417cd7d66f LogToIrc: add missing import 2021-10-20 17:39:50 -07:00
Valentin Lorentz
63eb6672ea Revert generic 'The Limnoria Contributors' in copyright notices
This commit reverts db7ef3f025
(though it keeps the year updates)

After discussion with several people, it seems better to mention
copyright owners explicitly. eg. https://reuse.software/faq/#vcs-copyright
explains the issue of using VCSs to track copyright.

As db7ef3f025 only replaced mentions
of my name with 'The Limnoria Contributors', this commit only needs
to undo that + add one person who contributed to setup.py.
2021-10-17 09:57:55 +02:00
PeGaSuS
f31e5c4b9a LogToIrc: Synchronize README with config.py
Better document the format of the 'target' config var
2021-10-09 22:53:13 +02:00
Valentin Lorentz
3f27c03f77 LogToIrc: better document the format of the 'target' config var 2021-10-09 21:08:48 +02:00
Valentin Lorentz
163e717bf0 Fediverse: increase again to fix failures on the CI... 2021-10-08 01:03:31 +02:00
Valentin Lorentz
d844243ce1 Fediverse: increase max heap size to mitigate crashes on pypy 2021-10-08 00:15:45 +02:00
Valentin Lorentz
bc0c5bdeed ChannelLogger: Log away messages 2021-10-07 21:34:04 +02:00
Valentin Lorentz
4d974869f9 String: Fix TypeError. 2021-09-21 21:41:25 +02:00
Valentin Lorentz
f468557899 Channel: Fix capability check in alertOps, to check the target instead of sender. 2021-09-21 21:21:21 +02:00
Valentin Lorentz
c93493901e Fediverse & String: Increase test timeouts, they can be flaky on CIs 2021-09-21 21:19:03 +02:00
Valentin Lorentz
dc79ab193a Update capitalization of my Github username 2021-09-14 20:30:47 +02:00
Valentin Lorentz
5b9ec4f716 LogToIrc: Prevent loop when sending to non-existing channels
When the target is a channel it is not in, it would treat it as a user;
which, if userCapabilityRequired is empty, would unconditionally send it
to a channel.
This would usually result in an error, that would be logged,
hence the loop.
2021-09-13 19:07:34 +02:00
Valentin Lorentz
070090ffc5 LogToIrc: Honor the configured log level 2021-09-13 19:05:42 +02:00
Valentin Lorentz
e63858659a Fediverse: Better assertionerror messages 2021-08-28 23:48:19 +02:00
Valentin Lorentz
52a5cefd50 Move stripformatting from Format to Filter, for consistency 2021-08-28 23:37:21 +02:00
Valentin Lorentz
db05081ff6 commands: fix _checkUrl 2021-08-25 23:28:25 +02:00
Valentin Lorentz
be88530fa4 commands: Disallow IRIs from 'url' and 'httpUrl' converters.
urllib doesn't support IRIs, and gives out a cryptic
'UnicodeEncodeError: 'ascii' codec can't encode character ...'
if we don't validate it.
2021-08-25 21:54:55 +02:00
Valentin Lorentz
ca624d7ae6 RSS: Fix nondeterministic test failures
Caused by 'rss announce add' triggering headline announces, that would
delay the execution of the 'remove' commands.

Thanks to @mapreri and @Unit193 for help in reproducing the issue
and confirming the patch.
2021-08-22 19:23:05 +02:00
Valentin Lorentz
0c8e455b4e RSS: When deleting a named feed, preserve anonymous feed of the same URL. 2021-08-22 19:21:28 +02:00
Valentin Lorentz
db7ef3f025 all: Add generic 'The Limnoria Contributors' to copyright notices.
No need to bother with details (that are all outdated / out of sync
anyway), just look up the git history.
2021-08-01 21:54:49 +02:00
Valentin Lorentz
c008d1191c RSS: Fix crashes when the set of channels changed while iterating. 2021-07-31 14:33:34 +02:00
Valentin Lorentz
0af4af16d3 RSS: Fix random test failure
Closes GH-1479
2021-07-04 10:46:51 +02:00
James Lu
64ae28c0b8 Remove references to my old nick 2021-07-03 16:42:13 -07:00
Valentin Lorentz
b8aa5aa33e User: Make @register automatically add the account tag
No need for '@nickauth nick add' right after registering anymore.
2021-06-30 21:28:17 +02:00
Valentin Lorentz
c23227cdc7 MessageParser: Show error when the action has a syntax error
Instead of being silent
2021-06-28 23:10:36 +02:00
Valentin Lorentz
6b72672a1e Poll: Fix typo in documentation 2021-06-28 23:10:36 +02:00
James Lu
a7216d290f Remove Spanish translations as requested by the author 2021-06-24 22:36:04 -07:00
Valentin Lorentz
a7c4c9bd78 Poll: Document usage. 2021-06-19 16:56:17 +02:00
Valentin Lorentz
936d7ebfea Poll Disallow 0 as poll id. 2021-06-19 16:48:40 +02:00
Valentin Lorentz
d919e2133d Poll: Initial commit with basic features. 2021-06-19 16:44:21 +02:00
Valentin Lorentz
3b25a94b46 Regenerate READMEs. 2021-06-19 16:44:21 +02:00
Valentin Lorentz
2293d1c129 Services: Update to the latest version of the draft/account-registration spec. 2021-06-15 20:35:55 +02:00
Valentin Lorentz
4b82934131 Services: Add @nickserv and @chanserv command, to message services directly
This is because the recommended method ('owner ircquote nickserv register mypassword bot@example.com')
does not work on charybdis, as Limnoria inserts a colon
before the trailing argument and Charybdis' m_alias module
does not parse commands using the IRC syntax, so it
considers the leading colon to be part of the email address.

The alternative would be to change the recommended command to:
'owner ircquote PRIVMSG nickserv :register mypassword bot@example.com'
but it is prone to typos, so I think we should avoid it.
2021-06-14 21:47:36 +02:00
Valentin Lorentz
a4758146d8 Factoids: Fix NameErrors in HTTP callback. 2021-06-01 12:16:34 +02:00
Valentin Lorentz
4caf35f94b Dunno: Document command substitution 2021-06-01 10:43:05 +02:00