Valentin Lorentz
63b0d7e653
Update core fr translation.
2019-11-24 12:47:03 +01:00
Valentin Lorentz
0828b207be
Add fallback if getting supybot.language from registry cache failed.
2019-11-24 12:46:10 +01:00
Valentin Lorentz
423a38770b
Get locale name on startup from registry cache instead of parsing config file.
...
Parsing the config file needlessly requires an extra read of it,
and is brittle (extra spaces, etc.)
It was especially broken as there was a newline character
at the end of currentLocale, which made everything fail
shamefully.
2019-11-24 12:04:21 +01:00
Valentin Lorentz
a8b6698849
Add config supybot.reply.format.list.maximumItems to limit the size of format('%L', ...).
2019-11-23 18:48:58 +01:00
James Lu
9291fbd4a0
All plugins: set Limnoria contributors as maintainer
2019-11-16 11:41:13 -08:00
James Lu
a4701b258c
Plugin: accept author name in 'contributors' command
2019-11-16 11:41:13 -08:00
James Lu
7854db7135
Better formatting in supybot.Author if some fields are missing
2019-11-16 11:41:13 -08:00
Valentin Lorentz
2dddfefa98
Fix log on SASL failure.
...
Broken by 04b55805b8
.
2019-11-09 18:38:40 +01:00
Valentin Lorentz
6a9462be00
Fix reset of capabilities_ls.
...
Broken by 0014b206ad
.
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 8bb31a54e7
.
( 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
dcf55cf6de
, 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 a4f8e3f647
.
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.
...
c87aacb690
b882d1cc00
b1db15c056
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
Valentin Lorentz
7adc958dd6
Fix SyntaxWarnings on Python 3.8
2019-01-06 18:06:44 +01:00
Valentin Lorentz
a03a89730a
Fix bugs in wrapping IRC messages.
2019-01-06 16:48:11 +01:00
Valentin Lorentz
93b0476751
Fix text wrapping when colors cross message boundaries.
2019-01-05 23:47:56 +01:00
Valentin Lorentz
b1db15c056
Add a symlink supybot pointing to src/ + move locales/ to src/
...
This looks like a more standard source tree, and allows for running tests without installing.
2019-01-02 14:29:32 +01:00
Valentin Lorentz
fcf30a5601
Fix FutureWarning related to nested sets.
...
See https://bugs.python.org/issue30349
2018-12-29 23:36:57 +01:00
Valentin Lorentz
06400596e9
Prevent commands.process from trying to increase heap size. Closes GH-1353.
2018-12-15 22:15:12 +01:00
Valentin Lorentz
c1d3bad64f
Raise error even if supybot.replies.(generic)noCapability is empty.
2018-10-06 08:13:11 +02:00
Valentin Lorentz
11dd5049fe
Fix MITM warning.
2018-10-06 08:13:10 +02:00
Valentin Lorentz
88894d69bc
Fix fa2c11eec1
.
2018-09-25 20:04:07 +02:00
Valentin Lorentz
1ac7812d7a
Use __slots__ for core config values.
2018-09-25 18:59:46 +02:00
Valentin Lorentz
fa2c11eec1
registry: Get rid of the 'class X'-based hack.
2018-09-25 18:55:42 +02:00
296d44354f
src/conf.py: clarify supybot.protocols.http.proxy
2018-09-16 14:19:30 +02:00
Valentin Lorentz
c433f05190
Add a config var to require SASL auth when connecting.
2018-09-10 22:48:49 +02:00
Valentin Lorentz
7cc7b4fac9
Redesign the message truncation algorithm.
2018-09-10 22:39:45 +02:00
James Lu
c5175110e0
Socket: fix 91a38887a
with backported ipaddress on Python 2
...
Closes GH-1342.
2018-07-09 03:37:10 +00:00
James Lu
72c4801bb9
Socket: fix previous commit
2018-06-19 12:13:45 -07:00
James Lu
91a38887a2
Socket: suppress "not using TLS" errors on loopback addresses
...
This is a refined version of #1317 .
2018-06-19 11:59:42 -07:00
Valentin Lorentz
c2b6305c46
Config: Support arbitrarily many channels for '@config channel'.
2018-05-29 22:17:28 +02:00
James Lu
43ee68ee3d
conf: maxHistoryLength no longer requires a restart to apply
...
03c4529d9e
made irc.state.history network specific, so reconnecting each network separately will update its history buffer's max length.
2018-05-19 12:50:56 -07:00
Valentin Lorentz
0d627c05b7
Do not break UTF-8 characters in long words. Closes GH-1333.
2018-04-14 22:31:30 +02:00
James Lu
75e6816e91
Merge pull request #1332 from farooqkz/master
...
Added docstring for getIrc()
2018-03-26 08:10:12 -07:00
Farooq Karimi Zadeh
3a4b77cefd
Added docstring for getIrc()
2018-03-26 13:40:15 +04:30
Valentin Lorentz
c930edd943
Report 'Limnoria <foo>' instead of 'Limnoria Limnoria <foo>' as a version.
2018-03-02 01:20:52 +01:00
Valentin Lorentz
af98c0c12e
Allow MODE arguments that do not start with a + or a -.
2018-02-06 15:35:49 +01:00
Valentin Lorentz
9c1d46d151
Add channel-specific config variables that are only settable by the owner.
2018-02-06 14:20:37 +01:00
Valentin Lorentz
636712be51
Limit the number of combinations of capabilities required for command names with spaces.
...
To call a command named 'X Y Z' in plugin 'P', we used to require lots of capabilities,
like 'P.X', 'P.Y', 'P.Z', 'P.X.Y', 'X.Y', 'P.Y', ...
Now, we only require 'P', 'P.X', 'P.X.Y', 'P.X.Y.Z', and 'Z'.
It makes it a lot easier to work with command names with a space when
supybot.capabilities.default is False.
2018-02-02 18:20:05 +01:00
Valentin Lorentz
39dacf6e5b
Fix Python 2 support.
2018-02-01 23:21:18 +01:00
Valentin Lorentz
030ce5e6d4
Fix previous commit.
2018-02-01 22:37:24 +01:00
Valentin Lorentz
63a17f7491
Rewrite text wrapping to count line size in bytes instead of characters.
...
Also, fix shitty comparisons that were done in reverse.
2018-02-01 21:32:14 +01:00
Valentin Lorentz
7e98802809
Drop STARTTLS support, it complicates the connection initialization too much.
2018-01-24 09:27:39 +01:00
Nicolas Coevoet
2b030ac178
more arguments added for WHOX, to avoid external plugins recall same requests
2018-01-23 19:37:19 +01:00
Valentin Lorentz
40b9bbcb1b
Send 'AUTHENTICATE :+' at the end of a SCRAM auth.
...
https://github.com/ircv3/ircv3-specifications/pull/326
2018-01-14 22:53:40 +01:00
James Lu
8981b225f1
ircdb: fix typo in supybot.capabilities.registeredUsers description
2018-01-06 10:39:05 -08:00
Valentin Lorentz
b9a159b68a
Add supybot.capabilities.registeredUsers, to give default capabilities to all registered users.
2018-01-05 19:24:54 +01:00
Valentin Lorentz
d656db454d
User: if '@hostmask add' detects a conflict and the caller is the owner, tell them who the conflicting user is.
2017-12-30 18:47:09 +01:00
James Lu
37a42b0e3b
ircutils: split ! and @ in hostmasks from the right
...
This fixes /names parsing when ! is a prefix character and userhost-in-names is enabled: previously, strings such as "!@user!ident@some.host" were incorrectly split into "" for nick and "@user!ident@some.host" for ident@host.
2017-12-17 04:21:35 -05:00
James Lu
dbbd7b4c4e
log: fix a typo (normal->normally)
2017-12-12 20:54:34 -05:00
James Lu
cc06c9f5f0
conf: mention that externalIP is not used by Limnoria core
...
Closes #1311 .
2017-10-29 16:24:45 -07:00
Ken Spencer
e08a393960
src/ircmsgs: modes doesn't just quiet ('Returns a MODE to /quiet/ each of nicks on channel') ( #1313 )
...
* src/ircmsgs: modes doesn't just quiet ('Returns a MODE to /quiet/ each of nicks on channel')
* plus also fix some possible english issues
* src/ircmsgs: fix up docs per @GLolol
* src/ircmsgs: fix up wording per @ProgVal s/pairs/2-tuples/
2017-10-29 16:55:10 +01:00
Valentin Lorentz
11bbc89c9d
Properly handle multiple hosts in supybot.servers.http.hosts4.
...
See ebb48a4808
(which I reverted).
2017-10-28 09:50:12 +02:00
Valentin Lorentz
96694a31f6
Revert "conf: fix validation of multiple IP addresses"
...
This reverts commit ebb48a4808
.
2017-10-28 09:32:52 +02:00
James Lu
ebb48a4808
conf: fix validation of multiple IP addresses
...
Previously, setting supybot.servers.http.hosts6 to multiple IP addresses always
failed because utils.net.isIPV6() gets passed a string with a space in it.
This code worked however for multiple IPv4 addresses because inet_aton(), which
is used internally by isIPV4(), allows and ignores trailing data after the
first IP address it finds.
Thanks to @MrBenC for reporting.
2017-10-27 23:57:52 -07:00
Valentin Lorentz
965dcc293d
Do not call noReply() on raw IRC objects.
2017-10-26 09:21:31 +02:00
Valentin Lorentz
73ddedd73c
Fix previous commit to work with Karma.
2017-10-21 15:53:38 +02:00
Valentin Lorentz
543edccd41
Properly handle noReplies() in nested commands.
...
This fix prevents the bot from replying 'Error: I tried to send you an empty message'
when 'utilities ignore' is called from an Aka.
2017-10-21 15:37:43 +02:00
Valentin Lorentz
4f6a5e7db9
Add config variable supybot.commands.allowShell. ( #1301 )
2017-09-24 21:11:21 +02:00
Valentin Lorentz
4a0ad92e58
Remove overly complicated code.
2017-09-19 00:34:25 +02:00
James Lu
d96d464698
test: lower wait time between fetching responses, for faster tests
2017-09-17 19:29:50 +02:00
Valentin Lorentz
bdbc79bfc6
Fix for Slack.
2017-08-23 18:51:54 +02:00
Valentin Lorentz
b00081f6c9
Make REMOVE a high-priority message. Closes GH-1294.
2017-08-03 22:02:01 +02:00
Valentin Lorentz
d5b4275b23
Merge pull request #1297 from Peppernrino/patch-1
...
Fix spelling mistake.
2017-08-01 09:48:41 +02:00
Peppernrino
f0b2af9ab2
Fix spelling mistake.
2017-07-31 23:50:01 -06:00
Valentin Lorentz
59ed253a0e
supybot-wizard: do not pollute the CWD before paths to directories are known.
2017-06-04 15:59:06 +02:00
Valentin Lorentz
5665f2f477
Use msg.tagged instead of deprecated IrcMsg.__getattr__ API.
2017-03-25 22:03:03 +01:00
Valentin Lorentz
355ff7ffdf
Fix support for Python < 3.4.
2017-02-25 13:24:03 +01:00
Valentin Lorentz
dab026169f
Use ast.literal_eval() instead of eval() when possible.
...
It's unlikely to change anything, but a little more safety
does not hurt.
2017-02-25 13:10:33 +01:00
Valentin Lorentz
8bae847682
Use ast.parse in 'eval' mode instead of 'exec'.
...
This fixes compatibility with Python 3.7; but we should have
been doing this since b8fe420ef3
.
The incompatibility with Python 3.7 was introduced in
cb41b2766d
See also: http://bugs.python.org/issue29646
2017-02-25 11:31:52 +01:00
James Lu
9f57bde853
ircutils: remove redundant str.replace
...
As strings, '\x0f' == '\x0F', and '\x1f' == '\x1F'
2017-02-23 17:30:34 -08:00
Valentin Lorentz
8652c683ab
Fix case-insensitive plugin loading if a plugin is in two directories.
2017-01-22 21:22:39 +01:00
Valentin Lorentz
8ce43110b6
Working support of scram-sha-256.
2017-01-11 00:10:46 +01:00
Valentin Lorentz
9be4db01f8
Fix ecdsa nameerror introduced in previous commit.
2017-01-10 23:27:50 +01:00
Valentin Lorentz
e87ad5b5a3
Untested implementation of SASL SCRAM auth.
2017-01-10 23:23:56 +01:00
Valentin Lorentz
90c5c78813
Add option --no-setuid to supybot-test
...
https://bugs.debian.org/834950
2017-01-10 22:56:17 +01:00
Valentin Lorentz
95a1f21600
Revert some instances of s/iteritems/items/ in be118c3338
.
2016-11-11 13:04:00 +01:00
Valentin Lorentz
5b29c8c0dd
utils.iter: Allow None argument to filterfalse and all.
...
Fixes bug in the Debian plugin.
2016-10-27 20:51:36 +02:00
Valentin Lorentz
337094a1f4
Document argument 'heap_size' of commands.process.
2016-10-26 18:11:01 +02:00
Valentin Lorentz
97d29d7913
Bring back VersionIsEmpty for supybot.user
...
Was removed by e5729bc86d
, but
the removal breaks compatibility with popular IRCds.
2016-10-01 23:47:42 +02:00
Valentin Lorentz
c6e29031d1
Make replies() behave consistently with reply() regarding the 'to' parameter.
...
Side-effect: Fixes channel-specificity of supybot.reply.onetoone for the Reply.replies command.
Closes GH-1266.
2016-10-01 13:37:03 +02:00
Valentin Lorentz
79bcc04d0a
Fix Python 3.6 support of utils.python.glob2re.
2016-09-14 20:09:00 +02:00
Valentin Lorentz
e5729bc86d
Remove VersionIfEmpty config type, useless since 278a111f5f
.
2016-08-16 11:03:58 +02:00
James Lu
278a111f5f
irclib: expand standard substitutions in realname
2016-08-16 11:00:58 +02:00
Valentin Lorentz
40a06d6527
Deprecate IrcMsg.__getattr__ and fix compatibility with Python ≥ 3.6.
2016-08-02 10:32:01 +02:00
James Lu
fea1ae1c20
ircutils: expand $version to Limnoria instead of Supybot
2016-08-01 20:57:21 -07:00
Valentin Lorentz
0d820477c2
GPG: Improve error messages.
2016-07-29 01:28:12 +02:00
Valentin Lorentz
e41b75d636
Merge remote-tracking branch 'mapreri/stable-output' into testing. Closes GH-1250.
2016-07-23 16:23:09 +02:00
Mattia Rizzolo
a69117a203
always sort the produced config files
2016-07-23 13:36:00 +00:00
Valentin Lorentz
dc4afb45a0
Try to provide Server Name Indication even if Python does not have SSLContext.
2016-07-20 20:42:40 +02:00
Valentin Lorentz
fa5552ee5f
Merge pull request #1235 from JunaidLoonat/master
...
Use HTTP proxy for HTTPS requests as well
2016-04-29 22:09:17 +02:00
Junaid Loonat
3a2b603f2f
Improved HttpProxy validation routine
...
Validation routine for HttpProxy updated to use the newly introduced isSocketAddress() function
2016-04-26 23:32:48 +02:00
Junaid Loonat
3e72aa5da5
New isSocketAddress() method
...
Introduction of the isSocketAddress() method which will use the existing getSocket() method in order to validate whether the provided string is a valid socket address.
2016-04-26 23:12:26 +02:00
Junaid Loonat
7be7b98e68
Update conf.py
2016-04-25 23:21:46 +02:00
Junaid Loonat
c211c60e52
Removed HTTP(S) proxy code
...
The HTTP(S) proxy is now set globally from the configuration logic.
2016-04-25 22:12:52 +02:00
Junaid Loonat
14e5c490e6
Update conf.py
2016-04-25 22:03:00 +02:00
Junaid Loonat
8d2da9aa3a
Immediate HTTP(S) proxy (de)activation
...
Introduction of HttpProxy class which is based off of the SocksProxy class.
Allows for immediate HTTP(S) proxy activation and deactivation, as the configuration is changed.
2016-04-25 21:50:52 +02:00
Junaid Loonat
654d98c125
Use proxy for HTTPS requests as well
...
Use proxy handler/opener classes, instead of request.set_proxy, to avoid any potential bugs in older Python versions.
Use the HTTP proxy (if configured) for HTTPS requests as well.
2016-04-25 10:14:49 +02:00
Valentin Lorentz
6ec0af2da3
Strip CTCP characters from irc.reply by default.
2016-04-24 21:11:34 +02:00
Valentin Lorentz
92ed5d484d
Open log files with UTF-8 encoding.
...
It seems to work better that way, at least on Python 3.
2016-03-24 22:04:35 +01:00
Valentin Lorentz
b64926814b
Add another fallback to log emitting in case of unicode-related error.
2016-03-20 12:56:33 +01:00
Valentin Lorentz
93feb71b66
Normalize fingerprints to allow more formats.
...
https://github.com/Limnoria/Limnoria-doc/issues/76#issuecomment-198794341
2016-03-20 10:28:33 +01:00
Valentin Lorentz
9cd2170a14
Add supported server fingerprint algorithms to the help of supybot.networks.*.ssl.serverFingerprints. Closes GH-1221.
2016-03-17 19:18:41 +01:00
James Lu
1b0c2ab95a
ircutils: add $network to standard substitutions
2016-03-14 20:30:11 -07:00
Valentin Lorentz
7f38076e59
Use HTMLParser.unescape instead of chr to decode HTML entities.
...
This adds support for entities encoded in hexadecimal notation.
2016-03-08 22:00:44 +01:00
Valentin Lorentz
bf02f79847
Merge pull request #1220 from GLolol/drivers/logging
...
Socket: lower SSL related log level, and reword text to flow better
2016-02-24 19:31:13 +01:00
Valentin Lorentz
2c1de2328b
Merge pull request #1219 from GLolol/patch-1
...
conf: fix help for verifyCertificates
2016-02-24 17:27:22 +01:00
Valentin Lorentz
f1390b1aec
Improve SSL-related version warnings.
2016-02-24 17:25:51 +01:00
James Lu
afc8d828b2
Merge remote-tracking branch 'origin/patch-1' into drivers/logging
...
Conflicts:
src/drivers/Socket.py
2016-02-24 07:07:29 -08:00
James Lu
7c9b92bee5
conf: fix help for verifyCertificates
...
Closes #1216 .
2016-02-24 07:02:10 -08:00
Valentin Lorentz
e1a86665ae
Remove unsupported option verify_mode to ssl.wrap_socket.
2016-02-24 07:43:21 +01:00
Valentin Lorentz
90c565c0c5
Fix name.
...
I thought I fixed that d922af1043
, but I
messed up with Git so hard I had to re-do that commit multiple times,
forgetting a new thing each time; and apparently that one passed through.
2016-02-23 21:56:52 +01:00
Valentin Lorentz
d163d1a1a3
Add support for authority certificates.
2016-02-23 20:52:36 +01:00
Valentin Lorentz
81a9d1fa39
Remove “Supybot” by “Limnoria” in the default version (following 661a32d1a9
).
2016-02-23 20:52:07 +01:00
James Lu
b344126318
Socket: update logging text to flow better
2016-02-23 07:29:16 -08:00
Valentin Lorentz
78cf550674
Socket: fix crash on Python versions that do no support certificate validation.
2016-02-23 16:25:37 +01:00
Valentin Lorentz
880addf256
Add link to FAQ items on how to upgrade to Python 3.
2016-02-22 20:18:37 +01:00
Valentin Lorentz
8c3946d31c
Actually, 3.2 and 3.3 don't have SSLContext either. Let's recommend only ≥ 3.4.
2016-02-22 18:36:53 +01:00
James Lu
aee7ac3583
Socket: drop SSL-related logging from critical to warning / error, and fix spacing
2016-02-22 07:09:56 -08:00
Valentin Lorentz
a7096f8b3e
Disable SSL cert verification by default.
...
Having it enabled by default would break existing bots just by
doing the update.
Let's just show a warning and give owners some time to update
their config, for the moment.
2016-02-21 14:47:44 +01:00
Valentin Lorentz
ae560dbd2a
Add supybot.protocols.ssl.verifyCertificates.
...
And remove unused variable supybot.protocols.ssl.verifyMode.
2016-02-21 14:42:41 +01:00
Valentin Lorentz
e77e78e79e
Add support for using server certificate fingerprint instead of CA signature.
2016-02-21 14:18:14 +01:00
Valentin Lorentz
d922af1043
Verify server certificate, and deprecate Python < 2.7.9. Closes GH-1031.
2016-02-21 13:20:09 +01:00
Valentin Lorentz
c3dd5f8b64
Make SSL the default for connecting to a new network.
2016-02-21 13:04:26 +01:00
Valentin Lorentz
b33dadea9e
Make INFO a bit less verbose when connecting.
2016-02-21 11:01:31 +01:00
Valentin Lorentz
c260a76e06
Add fallback for interpreters which do not support __slots__ for str subclasses.
...
Affects CPython 2.x, but neither CPython 3.x or Pypy.
Incompatibility introduced in 38e7589ff3
.
2016-02-20 13:35:40 +01:00
Valentin Lorentz
15e387ea46
Make irc.replies return all results in a single line by default (instead of following the conf), if used in a nested command. Closes GH-219.
2016-02-20 12:57:04 +01:00
Valentin Lorentz
38e7589ff3
Make i18n.InternationalizeString use less memory.
2016-02-20 09:51:24 +01:00
Valentin Lorentz
a538920df7
Catch more unicode-related exceptions when trying to write logs to a file.
2016-02-09 18:40:00 +01:00
Valentin Lorentz
6d4ea07b72
Remove a driver from the list of dead drivers after it has been restarted. Closes GH-1165.
2016-02-09 17:31:39 +00:00
Valentin Lorentz
11496b4bbb
ircdb: When serializing, do not write a 'password' command if there is no password set.
...
Having a 'password' command with no password stops the unserialization for that user.
May be a first step toward allowing users with no password (GH-1140).
2016-02-07 10:49:17 +01:00
Valentin Lorentz
61e5a29351
Fix scheme-matching regexp.
...
Old behavior allowed underscores and schemes starting with a digit,
and did not allow -+.
New behavior: https://tools.ietf.org/html/rfc3986\#section-3.1
Side effect: closes GH-1146
2016-02-07 09:44:08 +01:00
Valentin Lorentz
fee97c0308
irclib: Tag AWAY messages with channel names.
2016-01-09 10:10:41 +00:00
Valentin Lorentz
d2fe7d901f
Fix variable name.
2016-01-09 10:10:03 +00:00
Valentin Lorentz
4576874128
httpserver: Respond to HEAD requests. Closes GH-1203.
2016-01-05 18:25:35 +01:00
Valentin Lorentz
1d162dd048
httpserver: Fix Content-Length computation.
2016-01-05 18:05:36 +01:00
Valentin Lorentz
058e4100f2
httpserver: Use appropriate HTTP status code for unsupported methods.
2016-01-05 18:01:39 +01:00
Valentin Lorentz
7ce385b6f8
Don't substitude in errorInvalid. Closes GH-49.
...
Why was it doing substitutions in the first place?
2015-12-28 20:01:40 +01:00
Valentin Lorentz
d9a01629cd
Fix bytes count in message splitting.
2015-12-27 19:58:14 +00:00
Valentin Lorentz
49ff291f61
Use utf-8 to encode files by default.
...
Should fix this bug in Seen:
Traceback (most recent call last):
File "C:\Program Files\Python34\lib\site-packages\supybot\world.py", line 121, in flush
f()
File "C:\Program Files\Python34\lib\site-packages\supybot\plugins\__init__.py", line 271, in flush
writer.writerow(L)
File "C:\Program Files\Python34\lib\site-packages\supybot\utils\file.py", line 172, in write
return self._fd.write(data)
File "C:\Program Files\Python34\lib\encodings\cp1250.py", line 19, in encode
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\u25c4' in position 33: character maps to <undefined>
2015-12-23 15:22:19 +01:00
Valentin Lorentz
10522857b1
Fix activation of SSL for connections using SOCKS.
2015-12-18 20:33:36 +01:00
Valentin Lorentz
4b1c766b42
Add support for STARTTLS (not tested).
2015-12-12 16:40:48 +01:00
Valentin Lorentz
30cb10e422
Add support for CAP NEW, including reauthentication.
2015-12-12 00:52:44 +01:00
Valentin Lorentz
834453eeff
Request capability.
...
We don't do anything with it, but plugins might use it.
2015-12-11 23:32:57 +01:00
Valentin Lorentz
8aff8170e4
Filter list of SASL mechanisms when provided (908 or IRCv3.2-style CAP LS).
2015-12-11 23:30:57 +01:00
Valentin Lorentz
45c23a8f54
Try all possible SASL mechanisms instead of just one.
2015-12-11 10:56:05 +01:00
Valentin Lorentz
a72926ad11
Fix another issue with the help string.
2015-12-10 22:19:38 +01:00
Valentin Lorentz
9351f1fba2
Fix help string of supybot.reply.error.noCapability.
2015-12-10 21:56:01 +01:00
Valentin Lorentz
15d59d1153
Handle AUTHENTICATE line splitting.
2015-12-10 20:08:53 +01:00
Valentin Lorentz
3b78fd2424
Tag NICK messages with the channel as for QUIT messages.
2015-12-04 13:27:11 +01:00
Valentin Lorentz
d2749ea4d6
Add support for BATCH.
2015-12-04 01:37:23 +01:00
Valentin Lorentz
f880229d78
Tag QUIT messages with the list of channels the user was on.
2015-12-04 01:14:42 +01:00
Valentin Lorentz
0e8bfecf37
utils.structures: Define __slots__ for more classes.
2015-12-02 12:22:24 +01:00
Valentin Lorentz
7884ed5133
Merge pull request #1193 from GLolol/fix-disconnects
...
irclib: handle disconnections correctly for InspIRCd 2.0 networks
2015-11-19 08:01:27 +01:00
Valentin Lorentz
5f361ef180
Conditional: Add command @iferror. Closes GH-1114.
2015-11-14 19:20:25 +01:00
Valentin Lorentz
57b77a6725
utils.web: Rename getUrl to getUrlContent and add getUrlTargetAndContent.
2015-10-25 16:19:49 +01:00
Valentin Lorentz
e3ff413734
Web & core: Merge features of Web's title parser and utils.web.HtmlToText + don't unescape HTML twice. Closes GH-1176.
2015-10-23 07:41:36 +02:00
Jussi Timperi
df7689cc2e
Web & utils.web: Force HTMLParser to process all buffered data.
...
Python issue 23144.
2015-10-22 16:56:53 +03:00
Valentin Lorentz
85ee37c162
Remove unbreakable space.
2015-09-29 17:38:07 +02:00
James Lu
1168b4d0b7
irclib: handle disconnections correctly for InspIRCd 2.0 networks
...
The old code, which checked for "Closing Link" in the message, wouldn't have matched InspIRCd's way of closing connections (they send "Closing link" with a lowercase l):
DEBUG 2015-09-27T19:15:32 Incoming message (overdrive-irc): ERROR :Closing link: (LilyBot@0::1) [Quit: test]
2015-09-27 19:32:26 -07:00
Valentin Lorentz
b163dc7566
httpserver: Fix Python 2 compatibility.
2015-09-24 15:38:42 +02:00
Valentin Lorentz
a99e674b88
Add support for (anti)capabilities for multi-words commands. Closes GH-1140.
2015-09-23 12:00:18 +02:00
Valentin Lorentz
3047ea7acb
Add warning in setup.py about Python 2.6.
2015-09-20 15:50:43 +02:00
Valentin Lorentz
685bedcd74
Add config variable supybot.abuse.flood.command.notify.
2015-09-16 21:32:25 +02:00
Valentin Lorentz
879ce460e9
make utils.web.urlencode return a string, not bytes.
2015-09-09 22:02:19 +02:00
Valentin Lorentz
aa13ac88ea
Also send CAP END if no capability is requested.
2015-09-05 13:14:05 +02:00
Valentin Lorentz
f86e25d9fb
Prevent authentication hanging if the server supports no capability the bot asks.
2015-09-05 12:43:43 +02:00
Valentin Lorentz
17b1ae2dd5
Prevent 'dictionary changed size during iteration'.
2015-09-02 15:00:29 +00:00
Valentin Lorentz
912d2e1538
core: Apply some suggestions of pyflakes.
2015-08-31 18:19:22 +02:00
Valentin Lorentz
c01a956a8b
utils: Remove dependency on parent package.
2015-08-30 17:33:39 +02:00
Valentin Lorentz
c587900c6f
Make normalizeWhitespace remove \r as well.
2015-08-30 15:44:07 +02:00
Valentin Lorentz
09cb8e977f
supybot-test: Add a new level of verbosity, for showing only unexpected exceptions.
2015-08-29 23:02:20 +02:00
Valentin Lorentz
e5d8315e64
Language.
2015-08-29 21:46:47 +02:00
Valentin Lorentz
a905828b26
Fix Python 2.6 compatibility.
2015-08-26 17:59:50 +02:00
Valentin Lorentz
d1acdb6f92
Fix timezone handling in Python 2 and 3.2.
2015-08-26 17:42:42 +02:00
Valentin Lorentz
943c8bc495
Add support for IRCv3.2 extension chghost.
2015-08-22 20:48:03 +02:00
Valentin Lorentz
39df987274
Fix timezone handling of b338a2370
.
2015-08-22 20:38:16 +02:00
Valentin Lorentz
73ed9635b5
Add support for IRCv3.2 subcommand CAP DEL.
2015-08-22 20:25:39 +02:00
Valentin Lorentz
b338a23708
core: Use IRCv3.2 extension server-time to fill IrcMsg.time, if available.
2015-08-22 20:11:46 +02:00
Valentin Lorentz
11c10bb3f1
Add attribute IrcMsg.time.
2015-08-22 18:36:47 +02:00
Valentin Lorentz
33e8966e4b
ChannelLogger & core: Use IRCv3.2 extension invite-notify if available.
2015-08-22 18:24:32 +02:00
Valentin Lorentz
6ee24517cb
Fix 9c8f05bc16
.
2015-08-22 14:25:20 +02:00
Valentin Lorentz
a39238aba9
HTTP server: use two single-stack servers instead of a dual-stack one, and add a config variable to disable this behavior. Closes GH-945.
2015-08-22 13:10:03 +02:00
Valentin Lorentz
543732af3a
Fix f8328be5cb
so it actually does what it is supposed to do (lstrip removes characters).
2015-08-22 11:18:07 +02:00
Valentin Lorentz
9c8f05bc16
Use IRCv3.2 extension userhost-in-names if available.
2015-08-22 10:33:59 +02:00
Valentin Lorentz
9dd2811950
Split capabilities into a string, as it should be done.
2015-08-22 10:17:32 +02:00
Valentin Lorentz
5501b7cf63
Merge pull request #1156 from jacksonmj/italics
...
Add support for italic formatting
2015-08-22 09:25:54 +02:00
jacksonmj
8eb5d4f240
Add support for italics
...
New functions:
ircutils.italic to add
ircutils.stripItalic to remove
And remove italics in ircutils.stripFormatting.
2015-08-21 21:44:11 +00:00
Valentin Lorentz
21da27a846
Merge pull request #1155 from nyuszika7h/ipv4-mapped-addr-fix
...
httpserver: Strip IPv4-mapped IPv6 addresses
2015-08-21 22:41:33 +02:00
nyuszika7h
f8328be5cb
httpserver: Strip IPv4-mapped IPv6 addresses
2015-08-21 22:39:49 +02:00
Valentin Lorentz
f45e2904f5
Merge remote-tracking branch 'mlq/fix/httpserver-read-content-length' into testing
2015-08-17 22:35:40 +02:00
Moritz Lipp
52bebde9df
httpserver.py: Pass Content-Length to read call
...
If a POST request is sent to the built-in http server the handling function does
not terminate because the rfile.read() function blocks.
This patch passes the Content-Length value to the self.rfile.read() function
that is required for it to do not block the method.
Regarding RFC 2616
(http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.4 ) the
Content-Length header is expected to be sent otherwise this patch assumes a zero
length.
2015-08-17 22:30:21 +02:00
Valentin Lorentz
d56539a0dd
Fix http tests on Python 3.
2015-08-15 14:07:01 +02:00
Valentin Lorentz
0254d7b84d
Add a decorator to retry tests that fail often.
2015-08-11 17:13:27 +02:00
Valentin Lorentz
c3a2c800f1
Remove need for 2to3.
2015-08-11 16:50:23 +02:00
Valentin Lorentz
f305ff3c02
Remove fix_basestring.
2015-08-10 20:24:11 +02:00
Valentin Lorentz
2c380a4c3a
Remove fix_xrange.
2015-08-10 19:36:07 +02:00
Valentin Lorentz
be6bc1a734
Remove need for fix_unicode.
2015-08-10 18:52:51 +02:00
Valentin Lorentz
34d384bd67
Remove need for fix_methodattrs.
2015-08-10 18:09:52 +02:00
Valentin Lorentz
c0ac84bb53
Remove need for fix_import, fix_types, and fix_urllib.
2015-08-10 17:55:25 +02:00
Valentin Lorentz
17bf893437
Fix imports.
2015-08-09 09:21:12 +02:00
Valentin Lorentz
216c5d213f
Replace sys.version_info[0] usages with minisix.PY{2,3}.
2015-08-09 00:23:03 +02:00
Valentin Lorentz
5a82cefd51
Remove use of fix_long fixer.
2015-08-08 23:08:49 +02:00
Valentin Lorentz
be118c3338
Remove use of fix_dict fixer.
2015-08-08 23:08:49 +02:00
Valentin Lorentz
ed9f9d0794
Merge pull request #1148 from GLolol/patch-1
...
ircutils.formatWhois: ignore channels that have +p set
2015-08-08 20:37:17 +02:00
James Lu
8b37e23594
ircutils: fix Python 2.6 compatibility
2015-08-08 18:42:25 +08:00