Valentin Lorentz
2dddfefa98
Fix log on SASL failure.
...
Broken by 04b55805b8175e0f29d0f4d77dbae2b91b96d5d1.
2019-11-09 18:38:40 +01:00
Valentin Lorentz
6a9462be00
Fix reset of capabilities_ls.
...
Broken by 0014b206ada2cc1fbabe497a0048e2bfed608511.
2019-11-09 18:27:07 +01:00
Valentin Lorentz
5e2343f717
Update doc of capabilities.default to mention 'channel capability setdefault'.
2019-11-08 20:53:04 +01:00
Valentin Lorentz
04b55805b8
Log SASL mechanism on failure. Closes GH-1014.
2019-11-02 20:52:58 +01:00
Valentin Lorentz
10ccfbbf3c
Remove early return in upkeep() in case sys.stdout is replaced.
...
We don't want flushing to be entirely skipped just because
of that.
2019-11-01 22:18:32 +01:00
Valentin Lorentz
9268356e97
Split 'CAP REQ' commands to not exceed 512 bytes.
2019-10-25 23:07:31 +02:00
Valentin Lorentz
0014b206ad
Reset capability set state on reconnection.
2019-10-25 22:40:51 +02:00
Valentin Lorentz
cfbbed3da9
Truncate incoming lines to 512-2, not 500.
2019-10-25 22:31:09 +02:00
Valentin Lorentz
71cc414ff3
Fix conditional on CTCP in urlSnarfer.
...
Broken in 8bb31a54e719af4deaa52b28c22792880492f711.
( 8bb31a54e7
\#diff-44309956f4d4fbbe0b8499c3d849080fL209-R212 )
2019-10-22 17:57:46 +02:00
James Lu
35a64eca38
Plugin: update tests
...
I'm taking the liberty of adding myself to supybot.authors here.
2019-10-19 11:34:24 -07:00
James Lu
930da6a6ba
Use a real invalid email in supybot.authors.unknown
2019-10-19 10:20:38 -07:00
James Lu
e7f033539b
Don't repeat nick in supybot.Author if nick and name are the same
...
This is the case e.g. for quantumlemur's plugins.
2019-10-19 10:20:38 -07:00
James Lu
18f9a342b3
Throw out mungeEmail for supybot.Author
...
This has limited value these days, because 1) the email info for authors is most often in a public VCS already 2) it makes using the actual contact info harder.
2019-10-19 10:20:35 -07:00
James Lu
b54d8f8073
regexp_wrapper: return None instead of False when search times out ( #1379 )
...
This allows plugins to detect whether a search timed out or did not match, which are two distinct outcomes.
2019-10-17 12:30:07 -07:00
Johannes Löthberg
27e7d6a9ac
Aka: Add web UI ( #1373 )
...
* utils.web: Import html escaping functions
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
* Aka: Add web interface for browsing Akas
Fixes #1226 .
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
* httpserver: Actually handle KeyError in unhook
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
* test: FakeHTTPConnection: Don't decode data in send
BaseHTTPRequestHandler expects to get bytes, so we can't decode the sent
data.
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
* test: HTTPPluginTestCase: Use BytesIO instead of StringIO
BaseHTTPRequestHandler expects bytes, not strings.
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
* test: HTTPPluginTestCase: Rewind wfile to 0 before reading the response
Otherwise the read pointer is at the end of the file.
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
* Aka: Add basic web UI tests
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
2019-10-10 17:27:34 +02:00
Valentin Lorentz
8b2cbbc583
Use a monotonic time for registry cache.
...
So an old cache does not take precedence over a newly set value.
I noticed this bug because of the time going backward in tests
because of the time.time mock introduced in
dcf55cf6deb90f2498e53068175562aa36d315cc, but this may happen
in production systems too.
Also adds another deprecation warning for python < 3.3.
2019-10-05 22:29:11 +02:00
Valentin Lorentz
a4665803fa
News + RSS: Mock time.time() instead of using time.sleep() in tests.
...
Saves 40s over the ~5min test suite.
2019-10-05 12:22:30 +02:00
Valentin Lorentz
3c42ce0861
Only clear users db if the filename is set.
2019-09-28 10:33:54 +02:00
Valentin Lorentz
bcbaa979d5
Revert "Deduplicate (de)serialization code shared by UsersDictionary and ChannelsDictionary."
...
This reverts commit a4f8e3f64734f1cd3331cb380e00ba8fe8bdf65e.
2019-09-28 10:33:10 +02:00
Valentin Lorentz
5bfee2e72b
Fix typo in doc.
2019-09-26 23:00:01 +02:00
Valentin Lorentz
a4f8e3f647
Deduplicate (de)serialization code shared by UsersDictionary and ChannelsDictionary.
2019-09-26 22:48:05 +02:00
Valentin Lorentz
7d218ec8ce
Document unpreserve.Reader (expected format + method hooks).
2019-09-26 22:47:04 +02:00
Valentin Lorentz
84c1f1572d
Don't temporarily set msg.channel to invalid values.
...
This causes issue when multiple command threads deal with the same message.
2019-09-20 21:25:32 +02:00
jesopo
6c5072cfe0
only raise in commands.process() when a raise was wrapped ( #1370 )
2019-09-18 20:27:02 +02:00
Valentin Lorentz
40837dbda0
Don't mutate server list while iterating on it.
...
It causes hanging at bot/test stops.
2019-09-15 08:02:10 +02:00
Valentin Lorentz
573921c00f
Merge branch 'netconf-and-ircmsgs-channel' into testing
2019-09-14 12:10:47 +02:00
Valentin Lorentz
67c2bacd69
Set msg.channel in ReplyIrcProxy and NestedCommandsIrcProxy.
...
Needed when plugins use a self.Proxy with a crafted message;
else the called commands will assume the message was sent in
private.
2019-09-08 21:35:35 +02:00
Valentin Lorentz
f143e977d6
Interpret empty server tag values as missing tag values.
...
As required by https://ircv3.net/specs/extensions/message-tags
2019-09-08 14:47:05 +02:00
Valentin Lorentz
88524beada
ChannelLogger + Karka + all DB plugins: Sanitize channel names when used in filenames.
2019-09-06 20:42:13 +02:00
Valentin Lorentz
b65d78518c
Services: Add support for network-specific password.
2019-08-25 14:08:11 +02:00
Valentin Lorentz
0b5bd625eb
Add test for simple registry value inheritance.
2019-08-25 00:07:29 +02:00
Valentin Lorentz
7e1a1a23a9
Fix fallback of Group.__getattr__ on protected attributes.
2019-08-25 00:06:35 +02:00
Valentin Lorentz
e9bf05bbab
Don't unregister subtree if only the child is unset.
...
Because now, grandchildren may have set values.
2019-08-24 23:37:23 +02:00
Valentin Lorentz
c1ae3f5c81
all plugins: Use msg.channel instead of msg.args[0] + give network name to self.registryValue.
2019-08-24 23:35:01 +02:00
Valentin Lorentz
9326331c60
Merge branch 'ircmsg-channel' into netconf-and-ircmsgs-channel
2019-08-24 15:39:17 +02:00
Valentin Lorentz
8bb31a54e7
Strip statusmsg chars in core to determine the actual channel.
...
Use msg.channel if relevant, otherwise strip them locally.
2019-08-24 14:52:59 +02:00
Valentin Lorentz
5b40b5136d
Limit statusmsg prefix stripping to PRIVMSG and NOTICE.
2019-08-18 10:09:11 +02:00
Valentin Lorentz
7a7cdb9f05
Add a 'channel' attribute to IrcMsg objects.
...
It's nicer to use 'irc.channel' instead of 'irc.args[0]', and .channel
provides the actual channel name (stripped of the statusmsg prefix),
so it can be used by plugins when they want to use the actual channel
name.
2019-08-17 22:23:51 +02:00
Valentin Lorentz
4f024cb0b2
Add network-specific config values.
2019-08-15 12:22:43 +02:00
Valentin Lorentz
d4cac026d4
Remove '+' from the default chantypes.
...
It's more likely to be a statusmsg than chantype.
2019-08-04 21:52:40 +02:00
Valentin Lorentz
696254ff1b
Use irc.isChannel instead of ircutils.isChannel when possible.
...
It's aware of the network's 'chantypes'.
2019-08-04 21:52:40 +02:00
Valentin Lorentz
bf7db13f01
Disallow mutating commands in Aka/Alias/Scheduler by default.
...
It's too easy to abuse these commands when owners don't know they have to set
the appropriate anticapabilities; so let's set the anticapabilities by default.
2019-07-31 23:00:55 +02:00
Valentin Lorentz
76699ec063
Add support for 'message-tags' capability, to receive TAGMSGs.
2019-05-08 21:19:53 +02:00
Valentin Lorentz
71dbd39dd7
Revert changes to the structure of sdist packages.
...
c87aacb690c9b9b24487c64e28a1cfa51605b572
b882d1cc00924e2cd7b9cb6769e7c637a7fdd1f2
b1db15c0562ff9f719570842358b7e6d2605a209
2019-02-23 00:12:06 +01:00
jesopo
e7b076aa44
startwith
-> startswith
2019-02-22 20:31:07 +01:00
jesopo
61d9596d35
Support [ipv6]:port
format
2019-02-22 20:31:07 +01:00
Valentin Lorentz
233deee0d3
Fix previous commit for py2 and pypy.
2019-02-07 21:35:39 +01:00
Valentin Lorentz
969b9ed341
Make utils.python.collect_extra_debug_data support objects with __slots__.
2019-02-07 21:00:56 +01:00
Valentin Lorentz
624553c069
irclib: Don't return the same nick twice when duplicates in supybot.nick.alternates + supybot.nick.
...
It migt crash on: 'assert newNick != self.nick'
2019-01-27 09:10:06 +01:00
Valentin Lorentz
b051537f7f
Add support for Python 3.8/nightly.
2019-01-06 18:08:15 +01:00