Commit Graph

11385 Commits

Author SHA1 Message Date
Valentin Lorentz
3d1e88cb68 safeEval: Get rid of eval().
It should be safe considering the AST sanity checks,
but I don't see any point in keeping it.
2020-05-15 18:31:04 +02:00
Valentin Lorentz
6f4e3a2dbd QuoteGrabs: Add support for +draft/reply to point to the message to grab. 2020-05-15 18:17:34 +02:00
Valentin Lorentz
a54db1034f Fix Python 3.4 support. 2020-05-14 21:49:56 +02:00
Valentin Lorentz
eaf7222509 Fediverse: Cache host support for webfinger before snarfing.
This is much cheaper both for us and the host if the host
doesn't support activitypub at all (which is what happens
most of the time).
2020-05-14 21:33:34 +02:00
Valentin Lorentz
566920070c Fix regressions in 4046a1b201. 2020-05-14 19:00:31 +02:00
Valentin Lorentz
7444e656d8 supybot.reply.format.databaseRecord: Add $nick 2020-05-14 18:56:20 +02:00
Valentin Lorentz
4046a1b201 ChannelIdDatabasePlugin: Make the format of showRecord() configurable. 2020-05-14 18:45:04 +02:00
Valentin Lorentz
dc736799b8 callbacks: Prevent passing 'value' as positional argument to registryValue.
In case we need to add other arguments in the future.
2020-05-14 18:43:54 +02:00
Valentin Lorentz
9e57913674 plugins/__init__.py: internationalize strings. 2020-05-14 18:42:22 +02:00
Valentin Lorentz
0c6b526fdd Add -scheduler.repeat to default capabilities.
It's too easy to use to flood.
2020-05-13 20:16:35 +02:00
Valentin Lorentz
e90b89f5b2 Owner: Honor supybot.reply.error.detailed on command syntax errors. 2020-05-13 19:58:06 +02:00
Valentin Lorentz
a9eb31f1b5 Scheduler: Preserve network across restarts. 2020-05-12 18:32:37 +02:00
Valentin Lorentz
27edb4f6c9 Fediverse: Lower timeout of networkless tests.
There are many calls to assertSnarfNoResponse, so there's a lot
of time wasted sleeping, while these commands are fast enough
to answer in less than 0.1s
2020-05-10 21:42:41 +02:00
Valentin Lorentz
dc2fe4d5f3 Fediverse: Deduplicate username formatting and add some error handling. 2020-05-10 21:39:15 +02:00
Valentin Lorentz
2c9e6544f5 Fediverse: Add @status. 2020-05-10 21:12:05 +02:00
Valentin Lorentz
4e74c6dbb3 Fediverse: Make URL snarfer take precedence over Web. 2020-05-10 16:19:13 +02:00
Valentin Lorentz
6ea8b6bb31 Fediverse: Move test data to its own module. 2020-05-10 15:11:10 +02:00
Valentin Lorentz
d1854cfc9b Fediverse: Add URL snarfer. 2020-05-10 14:52:55 +02:00
Valentin Lorentz
5908b86635 Fediverse: Add option format.statuses.showContentWithCW 2020-05-10 13:37:40 +02:00
Valentin Lorentz
a52e7fa91b Fediverse: Show content warnings. 2020-05-10 13:04:01 +02:00
Valentin Lorentz
7511984a60 Fediverse: Fix compatibility with Python 3.4 and 3.5. 2020-05-10 11:21:08 +02:00
Valentin Lorentz
27219409b4 Fediverse: Document how to enable HTTP signatures. 2020-05-10 11:17:35 +02:00
Valentin Lorentz
ec1b1be8ff Fediverse: Add proper tests. 2020-05-10 10:44:56 +02:00
Valentin Lorentz
759fca5eba Switch names of TimeoutDict and ExpiringDict.
For consistency, as TimeoutQueue has guaranteed deletion after the timeout,
like the new TimeoutDict (ex-ExpiringDict).
2020-05-10 08:42:25 +02:00
Valentin Lorentz
d205a9b5f8 Fediverse: Use ExpiringDict instead of TimeoutDict for the cache, it guarantees expiry after the timeout. 2020-05-10 08:34:36 +02:00
Valentin Lorentz
cf2142ddd2 Fediverse: Sign headers Date and Host to prevent replays. 2020-05-09 22:18:03 +02:00
Valentin Lorentz
5c5cad5851 httpserver: Fix circular dependency when servers.http.keepAlive is true. 2020-05-09 22:17:28 +02:00
Valentin Lorentz
fd702a6a92 Fediverse: Add @statuses command. 2020-05-09 21:39:58 +02:00
Valentin Lorentz
4f027f2cbf Config: Add @searchhelp, to search in the help string of config vars and groups. 2020-05-09 21:07:23 +02:00
Valentin Lorentz
ba0738c540 Fediverse: Generate instance key automatically. 2020-05-09 20:55:57 +02:00
Valentin Lorentz
d5e241cb0c Fediverse: run Black. 2020-05-09 20:55:28 +02:00
Valentin Lorentz
e9ff57a1c9 Fediverse: Add usernameSnarfer. 2020-05-09 20:47:11 +02:00
Valentin Lorentz
76950126b5 Fediverse: Fix Python 3.4 compatibility. 2020-05-09 20:42:38 +02:00
Valentin Lorentz
79f13f3051 Fediverse: Add @featured command. 2020-05-09 20:29:24 +02:00
Valentin Lorentz
cb679d8599 Fediverse: Bug fixes. 2020-05-09 20:29:05 +02:00
Valentin Lorentz
d20bdbb5b7 Fediverse: Remove test @post command. 2020-05-09 19:29:00 +02:00
Valentin Lorentz
70fa18d155 Fediverse: Better error on unknown profile. 2020-05-09 19:28:37 +02:00
Valentin Lorentz
e87a14826e Fediverse: First draft. 2020-05-09 19:27:34 +02:00
Valentin Lorentz
43a8724d3a Don't strip spaces when parsing registry values.
It breaks plugins.Messageparser.listSeparator, and probably others.
2020-05-08 22:18:27 +02:00
Valentin Lorentz
bd1d7c9fa1 Config: Add @searchvalues. 2020-05-08 22:02:05 +02:00
Valentin Lorentz
b07376d16f Config: Exclude network pseudo-vars from @search. 2020-05-08 22:02:05 +02:00
Valentin Lorentz
e990ffa30c Add long_description from a plugin's README.md 2020-05-08 22:02:05 +02:00
Valentin Lorentz
f54588f9dd Add a 'limnoria.plugins entrypoint, to discover plugins installed via pip/setuptools. 2020-05-08 22:02:05 +02:00
Valentin Lorentz
428f5ca5dc Misc: Show a basic help when @help is called without an argument and customHelpString isn't set. 2020-05-08 12:37:07 +02:00
Valentin Lorentz
0d89b2352b Add plugin load case-insensitivity test. 2020-05-08 11:58:12 +02:00
Valentin Lorentz
f18eafc8d8 Fix crash on simulated echos (they don't have a prefix set). 2020-05-08 11:57:02 +02:00
Valentin Lorentz
83a8afde16 Add experimental support for +draft/reply client capability on outgoing messages. 2020-05-07 21:17:55 +02:00
Valentin Lorentz
eb1e27e20b Add echo messages, either with the echo-message capability or simulated.
Plugin can opt in to getting echo messages by setting the class attribute
'echo_message = True' if they want to get echos.
This defaults to False in order not to break existing plugins, and because
they usually don't need it (there's outFilter for most cases).
2020-05-07 21:08:07 +02:00
Valentin Lorentz
572c609181 Add labels to outgoing messages when labeled-response is supported.
This is going to be useful for implementing echo-message; and to plugins
targetting only networks with labeled-response support.
2020-05-07 20:56:59 +02:00
Valentin Lorentz
bb063b8064 Check server_tags in IrcMsg.__eq__. 2020-05-07 18:38:18 +02:00