These do not pass the `ircutils.isUserHostmask` check despite being a valid msg.prefix. We should probably return gracefully here instead of forcing plugins to deal with such a case themselves.
Closes GH-1548
`registry.Value.__call__()` is a wrapper around access to
`registry.Value.value`, that checks if the value was set before the latest
call to `registry.open_registry`; and updates the `value` if needed.
When accessing `registry.Value.value` directly, this cache can't be
invalidated, causing the old value to still be used, until the next call
to `registry.Value.__call__()`.
This commit reverts db7ef3f02517f9f2a3c56829a22b9fad3c36e374
(though it keeps the year updates)
After discussion with several people, it seems better to mention
copyright owners explicitly. eg. https://reuse.software/faq/#vcs-copyright
explains the issue of using VCSs to track copyright.
As db7ef3f02517f9f2a3c56829a22b9fad3c36e374 only replaced mentions
of my name with 'The Limnoria Contributors', this commit only needs
to undo that + add one person who contributed to setup.py.
See e0fdcb67c09b26a79bbb3cbb2244d18149c5b0c2 for the rationale
(tl;dr: prevents triggering a degenerate case of the LRU cache when
there are over 1000 ignore masks)
When the number of hostmasks exceeds 1000 (the hardcoded size of
_patternCache and _hostmaskPatternEqualCache), this triggers
a pathological case in the LRU caches, that causes all calls to be
a cache miss.
This means that on every IRC message received, ircdb.checkIgnored triggers
a recompilation of *all* user hostmasks, which is very expensive
computationally.
This commit stores them in their own cache to prevent them from
expiring.
This dict was filled with IrcString keys, which is hashed
as lowercase, so when queried with a non-lowercase string,
the key would not be found, and lead to very confusing errors.
Even if they are not trusted. This fixes a regression in
97016b9c55e144ce234fdf67880b57dffc12aac3.
This happens because 'user._checkCapability' raises a KeyError
when the user has neither this cap or the anticap; which was mistakenly
caught here by the 'except KeyError' expecting to catch non-existing
users.
(And that why 'try' blocks should be limited to as few lines as possible.)
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.
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.
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).