Commit Graph

11493 Commits

Author SHA1 Message Date
Valentin Lorentz
6f34f377e5 Autocomplete: return only the common prefix + one word. 2020-08-29 18:38:39 +02:00
Valentin Lorentz
efb4d476a5 Autocomplete: Only return the end of the current word (or the next one if the current word is finished) 2020-08-29 18:19:00 +02:00
Valentin Lorentz
fbf9f0166d Autocomplete: Fix name of response tag. 2020-08-29 16:42:19 +02:00
Valentin Lorentz
a55fbab591 Autocomplete: Initial implementation.
This plugin implements the first version of
https://github.com/ircv3/ircv3-specifications/pull/415
2020-08-29 16:33:29 +02:00
Valentin Lorentz
fe84bfbbb6 callbacks: add comments to findCallbacksForArgs. 2020-08-29 16:29:40 +02:00
Valentin Lorentz
f253da049d ChannelLogger: rewrite relayed messages echoed by the server
The former code worked only with emulated echo-message, as it depends
on internal tags.
In case echo-message (and labeled-response) is enabled, rely on
remembering the label instead.
2020-08-23 16:34:59 +02:00
Valentin Lorentz
91d2a2860f ChannelLogger: Fix regression preventing outgoing messages from being logged.
Since eb1e27e20b, IrcCallback.__call__ filters out
privmsgs and notices sent by the bot itself unless echoMessage=True is set.
2020-08-23 16:32:47 +02:00
Valentin Lorentz
5dc72d2b34 Rename IrcCallback.echo_message to IrcCallback.echoMessage.
For consistency with 'alwaysCall' and 'noIgnore'.
2020-08-23 16:27:22 +02:00
Valentin Lorentz
761fc2353e utils.net: Do not disable TLS certificate check when authorityCertificate is set.
It makes sense that manually configuring a CA overrides this
value which defaults to False.
2020-08-01 21:46:26 +02:00
Valentin Lorentz
57da6d04e2 utils.net: always check fingerprints if they are set, even if verifyCertificates is False.
It makes sense that manually configuring fingerprints overrides this
value which defaults to False.
2020-08-01 21:45:08 +02:00
Valentin Lorentz
9317a67345 .travis.yml: don't test optional dependencies on pypy3 + trusty, python-cryptography can't build against the system openssl anymore. 2020-07-25 15:46:12 +02:00
Valentin Lorentz
8f72c418e5 callbacks: don't crash when the prefix is from network services. 2020-07-25 15:29:23 +02:00
James Lu
5b52c73fd4 README: point support channel to #limnoria
As Supybot upstream is unmaintained, having multiple channels adds to support overhead and makes conversations harder to follow. Also, #limnoria is already the larger of the two channels.
[skip ci]
2020-07-23 20:46:13 +02:00
Valentin Lorentz
a84eabf146 Factoids: Add --author filtering to @search. 2020-07-14 18:16:10 +02:00
Gordon Shumway
6e47278b9f
Google: Set User-Agent override. (#1426)
With a custom (globally-configured) user-agent, Google may serve a different page, which breaks this plugin.

This override disables this custom user-agent and uses a predefined one, which is known to work.
2020-07-14 14:44:43 +02:00
Gordon Shumway
5315cd3275 userAgents: avoid potential IndexError
random.choice() should only be run after verifying the config has been set.
2020-07-12 16:42:42 +02:00
Gordon Shumway
4c4d0024ca
Fix typo. HttpUserAgent -> HttpUserAgents (#1424)
Fixes typo in https://github.com/ProgVal/Limnoria/pull/1423
2020-07-11 15:13:13 -07:00
Gordon Shumway
73de5616e8
Selectable User-Agent for HTTP requests (#1423)
https://github.com/ProgVal/Limnoria/issues/1382
2020-07-11 10:25:09 +02:00
Gordon Shumway
e5a04aaf13 DDG: Add region test. 2020-07-06 22:34:29 +02:00
oddluck
1c1ba1119d DDG: Add region and safeSearch configs. 2020-07-06 22:34:29 +02:00
Gordon Shumway
902677a378 DDG: Fix redirect detection. 2020-07-06 22:34:29 +02:00
Valentin Lorentz
0284ed9ebd irclib: Don't error when 004 is missing umodes and chanmodes. 2020-07-05 19:45:08 +02:00
Valentin Lorentz
76edd3189c Herald: Use time.monotonic instead of time.time.
To prevent jumping backward and forward on system clock changes.
2020-07-03 21:00:43 +02:00
Gordon Shumway
9081f5678b Herald: Throttle default heralds.
Fixes https://github.com/ProgVal/Limnoria/issues/1372
2020-07-03 08:39:05 +02:00
Valentin Lorentz
138957676e DDG: better document the transitions in the parser. 2020-07-01 20:06:29 +02:00
Valentin Lorentz
427cf82d6b DDG: Add debug prints in the parser. 2020-07-01 20:05:23 +02:00
Gordon Shumway
59f1441d23 Google: Fix plugin. 2020-07-01 10:37:22 +02:00
Gordon Shumway
01f166a224 Google: Fix plugin. 2020-07-01 10:37:22 +02:00
Valentin Lorentz
9be5676dfd DDG: Update lite search URL.
Duckduckgo started redirecting https://duckduckgo.com/lite to https://lite.duckduckgo.com/lite
so it was mistakenly interpreted as a !bang.
Changing the initial URL fixes this false detection.
2020-07-01 10:33:26 +02:00
Gordon Shumway
a3e6887fc9 Keep closing parenthesis when snarfing URLs
Fixes bug when handling URLs with a closing parenthesis ')'. e.g. https://en.wikipedia.org/wiki/Harley_Quinn_(TV_series)
2020-06-27 20:41:56 +02:00
Valentin Lorentz
ef59a033e3 Channel: add support for MODES= with no value in ISUPPORT.
Oragono uses that.
2020-06-27 07:51:16 +02:00
Valentin Lorentz
6c4a8edb9c irclib: Ignore 'sts' in case of missing keys instead of aborting the connection.
In case https://github.com/ircv3/ircv3-specifications/pull/390 gets adopted.
2020-06-20 20:15:28 +02:00
Valentin Lorentz
76ead86e2c commands: Add a helpful error message instead of OSError when a subprocess can't be started. 2020-06-20 12:57:15 +02:00
Valentin Lorentz
0e2b0a96c8 SedRegex: Log error exceptions from the replacer. 2020-06-20 12:38:44 +02:00
Valentin Lorentz
8ed0b95962 supybot-wizard: re-prompt for channels if there were too many commas. 2020-06-14 20:17:33 +02:00
Valentin Lorentz
19f9604851 supybot-wizard: Fix handling of channel keys.
The keys should be in a separate configuration variable,
not be concatenated with the channels themselves.
2020-06-14 20:15:49 +02:00
Valentin Lorentz
88d0a3a79f NickAuth: Add WHOX test. 2020-06-12 19:29:08 +02:00
Valentin Lorentz
99e8b598d0 NickAuth: Add test for extended-join. 2020-06-12 19:11:29 +02:00
Valentin Lorentz
99cb656df0 NickAuth: Detect extended-join based on capability.
It's more reliable than just checking the number of arguments
(eg. if a network decides to add its own set of arguments in
a way incompatible with extended-join).
2020-06-12 19:11:15 +02:00
Valentin Lorentz
dd865583e7 NickAuth: cleanups. 2020-06-12 18:49:02 +02:00
Valentin Lorentz
42d1bd3f39 ircmsgs: Document IrcMsg attributes. 2020-06-07 16:43:20 +02:00
Valentin Lorentz
2ceb60762e Seen: Don't internalize IrcString (again). 2020-06-05 00:41:18 +02:00
Valentin Lorentz
277cbb6589 Socket: Add missing self argument to setTimeout. 2020-05-30 21:54:24 +02:00
Valentin Lorentz
2bcdfd069a Socket: Detect closed TCP connections.
So far Limnoria relied on detecting 'ERROR :closing link' (see doError
in src/irclib.py), but that's not a standard at all, and fails on
Oragono; so we need to do this to check we're disconnected.

Plus, parsing the argument of ERROR is awful in the first place.
2020-05-29 19:50:43 +02:00
Valentin Lorentz
d9b1d1f49d Socket: make setTimeout catch errors.
setTimeout may be called as a supybot.drivers.poll callback,
which may by the access to supybot.drivers.poll() in _select;
so a crash in setTimeout will propage up to _run(), which would
cause a random driver to be killed because another one failed
and that's bad.

For example:

INFO 2020-05-27T18:40:18 supybot Received SIGHUP, reloading configuration.
ERROR 2020-05-27T18:40:19 supybot Uncaught exception in in drivers.run:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/supybot/drivers/__init__.py", line 104, in run
    driver.run()
  File "/usr/lib/python3/dist-packages/supybot/drivers/Socket.py", line 194, in run
    self._select()
  File "/usr/lib/python3/dist-packages/supybot/drivers/Socket.py", line 167, in _select
    [], [], conf.supybot.drivers.poll())
  File "/usr/lib/python3/dist-packages/supybot/registry.py", line 422, in __call__
    self.set(_cache[self._name])
  File "/usr/lib/python3/dist-packages/supybot/registry.py", line 476, in set
    self.setValue(float(s))
  File "/usr/lib/python3/dist-packages/supybot/registry.py", line 495, in setValue
    super(PositiveFloat, self).setValue(v)
  File "/usr/lib/python3/dist-packages/supybot/registry.py", line 482, in setValue
    super(Float, self).setValue(float(v))
  File "/usr/lib/python3/dist-packages/supybot/registry.py", line 385, in setValue
    callback(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/supybot/drivers/Socket.py", line 305, in setTimeout
    self.conn.settimeout(conf.supybot.drivers.poll())
OSError: [Errno 9] Bad file descriptor
ERROR 2020-05-27T18:40:19 supybot Exception id: 0x86ecf
INFO 2020-05-27T18:40:21 supybot Removing driver SocketDriver(Irc object for irchaven).
2020-05-29 19:50:28 +02:00
Valentin Lorentz
fabe8a284e Socket: de-register setTimeout from supybot.drivers.poll's callbacks when dying. 2020-05-29 19:42:42 +02:00
Valentin Lorentz
88549f9faa Socket: Move call to supybot.drivers.poll outside the critical section.
It may do some non-trivial stuff (eg. calling registry callbacks);
and the less code in the locked-section the better.
2020-05-29 19:41:25 +02:00
Valentin Lorentz
aa2f9202ec Google: Fix false positives on embedded thumbnails (eg. Youtube results). 2020-05-28 19:07:08 +02:00
Valentin Lorentz
847e51a7ec plugins: Fix name mismatch of typeSubstitution in getCommandHelp.
Bug introduced in 4046a1b201.
2020-05-27 21:19:09 +02:00
Valentin Lorentz
8b9ac3540d plugins: Fix AttributeError in getCommandHelp.
Introduced in commit 4046a1b201.
2020-05-27 20:30:39 +02:00