If on an insecure connection: reconnect.
If on a secure connect: store it and do nothing else.
For now, stored STS policies are not read when connecting to an
insecure server.
There's no reason to use it anymore instead of Socket.
It's already missing features compared to Socket, and I don't want to
maintain it anymore so it will keep getting worse.
This change builds all the ircmsg objects directly in irc.reply, with
the original arguments.
A side effect is that if a config var is changed between the initial command
call and the call to '@more', this commit makes it use the old values,
but that shouldn't be too much of an issue.
Closes GH-1405.
If the last batch had less than plugins.Misc.mores messages;
getting the last messages of the batch would raise an IndexError,
causing the whole batch to be dropped.
It crashes with KeyError because databases.plugins.channelspecific sets
channel='#', which is a non-existent channel.
And it doesn't make sense to check for presence in channel if the DB is
shared between all channels anyway.
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.
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.
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().
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
```