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.
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]
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.
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).
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.
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).