Commit Graph

11893 Commits

Author SHA1 Message Date
Matias Wilkman 7cd700b4ae
Seen: show when the target is currently in the channel (#1559) 2023-10-09 19:31:50 +02:00
Matias Wilkman ec9e731fa5
Ignore trailing whitespace when addressing the bot by nick at end (#1563) 2023-10-08 19:07:08 +02:00
Matias Wilkman 5ccc035021
report channel counts and modes in status (#1562) 2023-10-05 21:13:55 +02:00
Valentin Lorentz 58287207d7 Socket: Fix hanging while TLS socket buffer is non-empty 2023-09-29 15:25:41 +02:00
Aminda Suomalainen a46a0733af .editorconfig: only apply indent_size and line_length for *.py 2023-09-29 11:43:04 +02:00
Aminda Suomalainen ecd0c926ea .editorconfig: configure text editors for Limnoria style guide 2023-09-29 11:43:04 +02:00
Aminda Suomalainen 7581525495 .gitattributes: enable EOL normalization 2023-09-29 11:43:04 +02:00
Aminda Suomalainen cf4c4ca5b8 requirements.txt: add ddate as an optional dependency for Time.ddate 2023-09-29 11:23:16 +02:00
Valentin Lorentz 119a93a744 PluginDownloader: Fix typo 2023-09-24 19:58:10 +02:00
Valentin Lorentz b1657a8735 Skip irctest on Python 3.7
It's no longer supported
2023-09-24 19:55:57 +02:00
Matias Wilkman fa01b019ed added a new repo for plugindownloader 2023-09-24 08:07:56 +02:00
Valentin Lorentz 850b4c3f69 MessageParser: Log and skip current regexp on error 2023-09-22 14:20:55 +02:00
famfo 91accc0458
SedRegex: Implement changing of sed response per channel (#1556)
Fixes #1433

Co-authored-by: Val Lorentz <progval+github@progval.net>
Co-authored-by: James Lu <hello@jlu5.com>
2023-09-19 08:56:36 -07:00
Valentin Lorentz 5ab7c8a749 Services: I still didn't test that code 2023-09-08 23:54:47 +02:00
Valentin Lorentz f905036d7a Services: Add missing import
It's needed since acad80296a
2023-09-08 22:47:54 +02:00
Eric Mertens 9e82e3f16c Add command to manually initiate SASL 2023-09-05 20:13:21 +02:00
Valentin Lorentz c66b973db0 SaslTestCase: Change config instead of messing with irc.sasl_next_mechanisms
Changing the internal state will break in the next commit, which
reorganizes SASL state initialization
2023-09-05 08:54:26 +02:00
Valentin Lorentz 81a5133c14 SaslTestCase: Use tearDown() method instead of finally: blocks
It's much cleaner
2023-09-05 08:54:26 +02:00
Valentin Lorentz f8dd8d7642 supybot-test: Add --clean-after option 2023-09-04 20:07:42 +02:00
Valentin Lorentz 6b778598bb --clean removes files before running tests, not after 2023-09-04 18:24:16 +02:00
Valentin Lorentz 8029e2b390 supybot-test: Ensure --clean doesn't leave 'backup' and 'test-logs' directories 2023-09-04 17:36:22 +02:00
Valentin Lorentz acad80296a Services: Update 'identified' state using SASL status
Otherwise features like auto-opping are permanently unavailable when using
SASL instead of NickServ IDENTIFY
2023-08-29 22:49:18 +02:00
Valentin Lorentz 5357f50bed Geography: Replace Canada/Newfoundland with America/St_Johns in tests
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1040997
2023-08-10 08:02:50 +02:00
Valentin Lorentz 71ae97ef5e MessageParser: On syntax error, detail which action caused the error
This can help users debug it.
2023-08-02 20:39:00 +02:00
Valentin Lorentz bb3d456fdf RSS: Add support for feed attributes in template string
See https://feedparser.readthedocs.io/en/latest/common-rss-elements.html#accessing-common-channel-elements
2023-07-26 14:21:34 +02:00
Valentin Lorentz 8168c52939 RSS: Fix traceback in tests with new feedparser versions 2023-07-26 14:20:45 +02:00
Valentin Lorentz 2b4c5eb78f Fix crash when calling .reply(..., action=True) on ReplyIrcProxy
instead of on NestedCommandIrcProxy.

ReplyIrcProxy._sendReply expects action=True to imply noLengthCheck=True, but only
NestedCommandIrcProxy.reply() enforces the latter, not ReplyIrcProxy.reply().

This crash was introduced in 3c1c4a69e9 by
moving NestedCommandIrcProxy's .reply() to ReplyIrcProxy.
2023-07-18 07:46:51 +02:00
Valentin Lorentz 054ee6e410 Disable generic error reply when supybot.replies.error is empty 2023-07-11 21:34:49 +02:00
Valentin Lorentz eb002a31e9 wizard: Check language is supported
Otherwise it may raise InvalidRegistryValue on first start
2023-07-08 16:46:13 +02:00
Valentin Lorentz 8d1d4b84eb Fix error message on invalid 'supybot.language' value 2023-07-08 16:42:26 +02:00
James Lu b374418c81 irclib: fix mismatched arguments when logging IRCv3 cap responses 2023-06-30 20:07:45 -07:00
James Lu b4bf877e77 Network: accept empty args in 'command' and 'cmdall'
Closes GH-1541
2023-06-30 19:40:49 -07:00
Val Lorentz 2902a85dbd
Fix STS parsing and handling of unchecked-TLS connections (#1524)
* ircutils: Fix incorrect log message on invalid STS policy

* STS: fix confusion over what a secure connection is

irclib computed 'secure_connection' when TLS is enabled and TLS certs
are checked; but ircutils used the value to parse STS policies, which
should only care about being TLS or not.

This commit fixes the incorrect parsing on unchecked-TLS, and triggers
a reconnect when a STS policy is encountered in this case, to force
TLS certs to be checked before storing the policy.

* Accept STS policies when reconnecting after getting it over cleartext

ircutils.parseStsPolicy() was passed self.driver.ssl which is the configured
value, even though the connection was forced to be TLS temporarily

* ci: Lower timeout

* Fix typo in test name

Co-authored-by: James Lu <james@overdrivenetworks.com>

---------

Co-authored-by: James Lu <james@overdrivenetworks.com>
2023-06-10 08:28:08 +02:00
Valentin Lorentz 97d67777d6 RSS: Sort entries in @rss responses as in announces 2023-06-08 19:58:50 +02:00
Valentin Lorentz ac84fa4d68 ircquote: Use labeled-response when possible to reply to the user 2023-06-08 19:55:47 +02:00
Tasos Sahanidis 6021f0e6d9
String: Display regex error on invalid group reference (#1537) 2023-06-04 12:51:27 -07:00
James Lu 416a05e326
Route commands from Network.command back to the original network (#1540)
Add a replyIrc parameter to ReplyIrcProxy to run a command on one network, but route the replies to another.
This fixes a long standing issue where replies for remote commands are often lost to the void, as the nick of the caller may not exist on the target network (or worse, it could belong to a completely unrelated person).

Closes GH-556.

Co-authored-by: Val Lorentz <progval+git@progval.net>
2023-06-04 12:39:56 -07:00
James Lu 654937ecfc botchk: move imports to top-level 2023-05-26 20:27:39 -07:00
Valentin Lorentz 21b7408ca8 ci: Bump Python 3.12 version 2023-05-21 19:01:40 +02:00
Valentin Lorentz 8859e1ce51 setup.py: Add Python 3.11 and 3.12 to classifiers. 2023-05-21 18:50:24 +02:00
James Lu 3be1804553 botchk: fix syntax error 2023-04-27 18:36:50 -07:00
Val Lorentz 1690839a26
Merge pull request #1532 from progval/entrypoints
Use setuptools 'entry_points' + add 'limnoria-*' CLIs in addition to 'supybot-*'
2023-04-27 20:52:17 +02:00
Valentin Lorentz 6f663e4140 Merge branch 'testing' into entrypoints 2023-04-26 18:04:21 +02:00
Valentin Lorentz 295798ac0e Stop testing pypy3.7 with optional dependencies
one of the dependencies stopped supporting it (probably 'cryptography'
as it's the only one not in pure-Python)
2023-03-24 20:49:14 +01:00
Valentin Lorentz add9306d30 Socket: Clear buffers on reconnect 2023-03-24 20:23:32 +01:00
Valentin Lorentz f518579c77 Request standard-replies capability
Arbitrary standard-replies are already supported, this signals to servers
that we do.
2023-02-21 19:10:11 +01:00
Valentin Lorentz 922b00c8c3 Fediverse: Use default headers
Some instances behind Cloudflare block requests without a User-Agent
header.
2023-01-28 13:00:16 +01:00
Valentin Lorentz 3f5a18e8d0 Remove unused import fallback on the 'mock' library 2023-01-21 18:51:17 +01:00
Valentin Lorentz efed7d8081 Move the 'ignore=False' trick from callbacks to Scheduler
I fear putting it in callbacks would be overzealous and reset it
within the processing of the same message, eg. when using conditional
to set the 'ignore' tag before other nested commands run.
2023-01-19 10:31:13 +01:00
Valentin Lorentz f409111872 callbacks: Fix interference between Scheduler.repeat, Anonymous, and nested commands
Specifically, the issue is with Anonymous using irc.noReply() in
the first call, preventing nested commands' result from being used.

Before this commit, the second and third responses in the test would be
only "1" and "2" instead of "1 ['foo']" and "2 ['foo']".
2023-01-19 10:19:01 +01:00