Commit Graph

11451 Commits

Author SHA1 Message Date
Valentin Lorentz
c489d2e9be Prevent getChannelDb from overriding state.channel set by getChannel.
I don't see any use for this; and it means a 'channel' converter
called after 'channeldb' returns '#' instead of the actual channel
if it's after 'channeldb' in the arg list and
databases.plugins.channelspecific is False.
2020-04-07 21:20:01 +02:00
James Lu
c212ee0e5e SedRegex: allow matching text with the trailing suffix missing
From: 866875ec5d
2020-04-02 10:00:40 -07:00
James Lu
c399272173 SedRegex: make callback matching case sensitive
This fixes a TypeError issue mentioned in d296bbb949.
2020-04-02 10:00:39 -07:00
James Lu
13c03716c5 Revert "SedRegex: Make pattern case-insensitive."
This reverts commit d296bbb949.
2020-04-02 09:47:32 -07:00
Valentin Lorentz
d296bbb949 SedRegex: Make pattern case-insensitive.
To fixes a mismatch between callbacks, which use flags=re.I by default,
and SED_REGEX.search which isn't; so 'S/foo/bar/' errored because it
matches case-insensitively so _unpack_sed is entered, but then _unpack_sed
fails to match it case-sensitively.
2020-04-02 17:30:57 +02:00
Valentin Lorentz
e2d72c5a43 Fix msgfmt warnings. 2020-03-26 22:10:28 +01:00
Valentin Lorentz
712d8c2eab Remove debug print
Was added in 8bb31a54e7.
2020-03-26 10:29:42 +01:00
Valentin Lorentz
246925acce Relay: Add missing 'network' argument.
Broken since c1ae3f5c81.
2020-03-25 20:56:24 +01:00
Valentin Lorentz
5f620ddd5c Don't use 'is not' for string comparison. 2020-03-25 20:10:06 +01:00
Valentin Lorentz
de77ce6ddc Raise exception instead of assert... 2020-03-21 02:21:06 +01:00
James Lu
487897e7cc PluginDownloader: remove legacy name & python 2 branch of my repo 2020-03-20 16:37:15 -07:00
Valentin Lorentz
3576503e3f Update links to the documentation. 2020-03-17 19:22:52 +01:00
Valentin Lorentz
8f001f8045 Check spec.loader is not None when importing a plugin. 2020-02-09 16:02:35 +01:00
nyuszika7h
0f3264cf26 Add modulo operator to new math evaluator
Closes #1402.
2020-02-08 16:08:23 +01:00
opal hart
f24a17e5c4 Config docs: remove reference to grouped nicks
Some networks (e.g. freenode) now allow usage of grouped nicks for SASL
username
2020-02-08 11:07:19 +01:00
Werner
89ee801d47
Missing German translations (#1401) 2020-02-01 09:20:52 +01:00
Valentin Lorentz
2f49362510 RSS: If ids are missing, use <link> as id. 2020-01-31 20:59:42 +01:00
Valentin Lorentz
653afdd086 RSS: Show a meaningful error in case '@rss' is called with a non-URL/name.
Instead of letting feedparser try to parse the name.
2020-01-28 19:35:05 +01:00
James Lu
d3b991895c SedRegex: skip testReDoSTimeout if multiprocessing is disabled 2020-01-27 08:00:46 -08:00
Valentin Lorentz
a6ae9f51a3 ChannelStats: Use the safe math evaluator. 2020-01-26 20:42:55 +01:00
Valentin Lorentz
99dd6f1506 core/Math: Move the math evaluator to src/utils/.
It will be used by ChannelStats.
2020-01-26 20:42:55 +01:00
Valentin Lorentz
5c10bea7aa Math: Fix log/log10 return type.
They used to always return complex numbers, instead of floats on float argument.
2020-01-26 20:42:55 +01:00
James Lu
4528a847e4 Aka, Google, String: fix more DeprecationWarning in tests (#1328) 2020-01-26 11:31:28 -08:00
James Lu
358c3a741f Channel: fix typo from 772862d49c 2020-01-26 11:22:51 -08:00
James Lu
304125cfd0 AutoMode, Channel, Nickometer: fix invalid escape sequence DeprecationWarning 2020-01-26 11:20:39 -08:00
James Lu
772862d49c plugins: use r'' strings to fix DeprecationWarning in test cases (#1328) 2020-01-26 11:14:25 -08:00
James Lu
ff899f5158 Aka, Debug: cleanup imports 2020-01-26 10:42:43 -08:00
Valentin Lorentz
9ab908759a Use importlib instead of imp.
importlib is deprecated.
2020-01-26 12:00:08 +01:00
Valentin Lorentz
9891b0fca4 Replace failUnless/failIf with assertTrue/assertFalse.
The old names are deprecated.
2020-01-26 11:14:18 +01:00
Valentin Lorentz
5efd2afa27 Socket: Don't add instances twice in cls._instances.
The connect() method already adds it, so it was in the list twice
(added both by __init__() and connect()).

This caused _select() to call _read() twice on the same instance,
except there is usually nothing to read on the second call,
so it blocks for up to conf.supybot.drivers.poll().
2020-01-25 21:00:42 +01:00
Valentin Lorentz
b5beb5f981 .travis.yml: fix indent 2020-01-25 00:12:31 +01:00
Valentin Lorentz
777d8e4920 Socket: use a proper lock instead of a boolean. 2020-01-23 16:47:49 +01:00
Valentin Lorentz
f862da3c0e .travis.yml: Allow failures on nightly.
Feedparser doesn't support this version of Python.
https://github.com/kurtmckee/feedparser/issues/201
2020-01-23 14:41:02 +01:00
Valentin Lorentz
e7553dcca4 Add subcommand dispatching for CAP/FAIL/WARN/NOTE. 2020-01-23 14:25:10 +01:00
Valentin Lorentz
c4d073a9be Rename doAuthenticate* functions to not conflict with callback names. 2020-01-23 14:24:41 +01:00
Valentin Lorentz
32d8d141ad Make irc.error do nothing is no string is given as argument.
Fixes c1d3bad64f, which crashed with:

```
ERROR 2020-01-18T01:34:07 Uncaught exception in NickAuth._callCommand:
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/supybot/callbacks.py", line 1337, in _callCommand
    irc.errorNoCapability(cap)
  File "/usr/local/lib/python3.7/dist-packages/supybot/callbacks.py", line 544, in errorNoCapability
    raise Error()
supybot.callbacks.Error

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/supybot/log.py", line 368, in m
    return f(self, *args, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/supybot/callbacks.py", line 1359, in _callCommand
    irc.error(str(e))
  File "/usr/local/lib/python3.7/dist-packages/supybot/callbacks.py", line 1065, in error
    raise ArgumentError
supybot.callbacks.ArgumentError
```
2020-01-18 11:04:54 +01:00
Valentin Lorentz
895881e66e Call super().setValue() before defaultHttpHeaders.
To prevent infinite recursion on startup, because defaultHttpHeaders
gets the value; which is unset, so 'registry._lastModified > self._lastModified'
is True, so .set() is called, so .setValue() is called again.
2020-01-17 19:49:16 +01:00
Valentin Lorentz
c457b52067 Deduplicate setting Accept-Language HTTP header.
This adds a new function conf.defaultHttpHeaders that can be used by plugins
to get all the default HTTP headers for a given network/channel.
2020-01-14 19:03:12 +01:00
Tasos Sahanidis
ae5ad2ceab Web: Implement protocols.http.requestLanguage 2020-01-14 18:48:11 +01:00
Tasos Sahanidis
62f8b47e61 Add supybot.protocols.http.requestLanguage 2020-01-14 18:48:11 +01:00
Tasos Sahanidis
7bd68df8aa Fix getSpecific usage
The channel and network arguments were incorrectly swapped
2020-01-12 10:35:35 +01:00
Valentin Lorentz
0fccea30ce Import MutableMapping and MutableSet from collections.abc.
Aliases in collections itself are removed in 3.8.
2020-01-09 01:11:12 +01:00
James Lu
94ca4cc810 setup.py: migrate shebang to Python 3 2020-01-05 11:35:00 -08:00
James Lu
1ab9f4642e setup.py: remove obsolete version_info conditionals
None of these will run since the base version is now Python 3.4.
2020-01-05 11:32:42 -08:00
James Lu
5c2e16f391 scripts: remove obsolete conditionals for Python 2 2020-01-05 11:31:45 -08:00
James Lu
7e70ce43f2 scripts: migrate shebangs and version checks to Python 3 2020-01-05 11:29:41 -08:00
James Lu
9e03e0e6e2 Be less hostile to users in --allow-root help 2020-01-05 11:25:47 -08:00
James Lu
d080edce00 Readd Limnoria name to default part & quit messages
This was removed in c930edd943
2020-01-04 11:17:57 -08:00
James Lu
9570ea9fb4 Merge branch 'sedregex-merge' into testing
Import SedRegex plugin: History replacer using sed-style expressions.
2020-01-03 21:24:21 -08:00
James Lu
758a3efa44 .travis.yml: remove --disable-multiprocessing (fix SedRegex tests) 2020-01-01 22:13:10 -08:00