Valentin Lorentz
63eb6672ea
Revert generic 'The Limnoria Contributors' in copyright notices
...
This commit reverts db7ef3f025
(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 db7ef3f025
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.
2021-10-17 09:57:55 +02:00
Valentin Lorentz
ee9f0dc1bf
STS: When persisting STS keys, use the actual port instead of the one from the policy
...
'Servers MAY send this key to securely connected clients, but it will be ignored.'
-- https://ircv3.net/specs/extensions/sts\#the-port-key
2021-09-03 20:15:18 +02:00
Valentin Lorentz
db7ef3f025
all: Add generic 'The Limnoria Contributors' to copyright notices.
...
No need to bother with details (that are all outdated / out of sync
anyway), just look up the git history.
2021-08-01 21:54:49 +02:00
Valentin Lorentz
406369d53f
Expose standardSubstitute's var dictionary
...
So it can be reused by plugins if they want to use a different templating
engine.
2021-07-21 09:45:28 +02:00
Valentin Lorentz
e19282a2d3
Actually parse weird hostmasks like RFC1459 recommends
...
Thanks to @Noisytoot for pointing out the RFC actually specific them
with this:
<user> ::= <nonwhite> { <nonwhite> }
2021-07-14 23:43:11 +02:00
Valentin Lorentz
5baf87ddba
ircutils: Improve robustness when faced with invalid hostmasks
...
eg. @ in nicks, which happened on pissnet earlier today.
2021-07-14 23:25:11 +02:00
Valentin Lorentz
43aada5b33
Store ignored hostmasks in Expiring HostmaskSet to prevent their pattern cache from expiring too soon
...
See e0fdcb67c0
for the rationale
(tl;dr: prevents triggering a degenerate case of the LRU cache when
there are over 1000 ignore masks)
2021-05-30 19:35:05 +02:00
Valentin Lorentz
e0fdcb67c0
Store IrcUser hostmasks in HostmaskSet to prevent their pattern cache from expiring
...
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.
2021-05-27 22:15:52 +02:00
Valentin Lorentz
a5cd870bd2
irclib: Refactor hostmaskPatternEqual to expose compileHostmaskPattern.
...
This clarifies the code a bit.
And I want to store compiled patterns in ircdb.User in a future
commit, so they can outlive the LRU cache.
2021-05-27 21:36:43 +02:00
Valentin Lorentz
bf90a7c94d
callbacks: Make reply() send multiline batches when supybot.reply.mores.instant > 1
2021-04-01 20:10:17 +02:00
Valentin Lorentz
a7a03513bf
ircutils: Set __slots__.
2020-05-22 08:38:42 +02:00
Valentin Lorentz
572c609181
Add labels to outgoing messages when labeled-response is supported.
...
This is going to be useful for implementing echo-message; and to plugins
targetting only networks with labeled-response support.
2020-05-07 20:56:59 +02:00
Valentin Lorentz
51ff013fcc
Apply STS policies when connecting to a server.
2020-05-01 19:46:19 +02:00
Valentin Lorentz
ecc2c32950
Add support for storing STS policies.
...
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.
2020-05-01 19:46:19 +02:00
Valentin Lorentz
63b0d7e653
Update core fr translation.
2019-11-24 12:47:03 +01:00
Valentin Lorentz
8bb31a54e7
Strip statusmsg chars in core to determine the actual channel.
...
Use msg.channel if relevant, otherwise strip them locally.
2019-08-24 14:52:59 +02:00
Valentin Lorentz
d4cac026d4
Remove '+' from the default chantypes.
...
It's more likely to be a statusmsg than chantype.
2019-08-04 21:52:40 +02:00
Valentin Lorentz
a03a89730a
Fix bugs in wrapping IRC messages.
2019-01-06 16:48:11 +01:00
Valentin Lorentz
93b0476751
Fix text wrapping when colors cross message boundaries.
2019-01-05 23:47:56 +01:00
Valentin Lorentz
fcf30a5601
Fix FutureWarning related to nested sets.
...
See https://bugs.python.org/issue30349
2018-12-29 23:36:57 +01:00
Valentin Lorentz
0d627c05b7
Do not break UTF-8 characters in long words. Closes GH-1333.
2018-04-14 22:31:30 +02:00
Valentin Lorentz
c930edd943
Report 'Limnoria <foo>' instead of 'Limnoria Limnoria <foo>' as a version.
2018-03-02 01:20:52 +01:00
Valentin Lorentz
af98c0c12e
Allow MODE arguments that do not start with a + or a -.
2018-02-06 15:35:49 +01:00
Valentin Lorentz
030ce5e6d4
Fix previous commit.
2018-02-01 22:37:24 +01:00
Valentin Lorentz
63a17f7491
Rewrite text wrapping to count line size in bytes instead of characters.
...
Also, fix shitty comparisons that were done in reverse.
2018-02-01 21:32:14 +01:00
James Lu
37a42b0e3b
ircutils: split ! and @ in hostmasks from the right
...
This fixes /names parsing when ! is a prefix character and userhost-in-names is enabled: previously, strings such as "!@user!ident@some.host" were incorrectly split into "" for nick and "@user!ident@some.host" for ident@host.
2017-12-17 04:21:35 -05:00
James Lu
9f57bde853
ircutils: remove redundant str.replace
...
As strings, '\x0f' == '\x0F', and '\x1f' == '\x1F'
2017-02-23 17:30:34 -08:00
James Lu
fea1ae1c20
ircutils: expand $version to Limnoria instead of Supybot
2016-08-01 20:57:21 -07:00
James Lu
1b0c2ab95a
ircutils: add $network to standard substitutions
2016-03-14 20:30:11 -07:00
Valentin Lorentz
15d59d1153
Handle AUTHENTICATE line splitting.
2015-12-10 20:08:53 +01:00
Valentin Lorentz
912d2e1538
core: Apply some suggestions of pyflakes.
2015-08-31 18:19:22 +02:00
jacksonmj
8eb5d4f240
Add support for italics
...
New functions:
ircutils.italic to add
ircutils.stripItalic to remove
And remove italics in ircutils.stripFormatting.
2015-08-21 21:44:11 +00:00
Valentin Lorentz
c3a2c800f1
Remove need for 2to3.
2015-08-11 16:50:23 +02:00
Valentin Lorentz
f305ff3c02
Remove fix_basestring.
2015-08-10 20:24:11 +02:00
Valentin Lorentz
c0ac84bb53
Remove need for fix_import, fix_types, and fix_urllib.
2015-08-10 17:55:25 +02:00
Valentin Lorentz
216c5d213f
Replace sys.version_info[0] usages with minisix.PY{2,3}.
2015-08-09 00:23:03 +02:00
Valentin Lorentz
5a82cefd51
Remove use of fix_long fixer.
2015-08-08 23:08:49 +02:00
Valentin Lorentz
be118c3338
Remove use of fix_dict fixer.
2015-08-08 23:08:49 +02:00
James Lu
8b37e23594
ircutils: fix Python 2.6 compatibility
2015-08-08 18:42:25 +08:00
James Lu
d74e3148b4
ircutils.formatWhois: ignore channels that have +p set
2015-08-08 03:14:46 -07:00
James Lu
5190db39a4
formatWhois: Fix channel names having the # cut off
2015-05-15 18:46:28 -07:00
James Lu
c651bc5482
formatWhois: fix error and restore formatting changes lost in supybot merge
...
This reapplies content from commits 2b324203e7
, 2628dc03c4
, ef9fbc4a07
,
41effcea13
, and 5f23855d27
.
2015-05-15 18:40:55 -07:00
Valentin Lorentz
82b8bf801a
core: Fix merge of upstream's factorization of whois formatting.
2015-05-16 03:21:17 +02:00
Valentin Lorentz
33004696c0
core: Add dictionary of numerics.
2015-05-16 00:20:31 +02:00
Valentin Lorentz
487f8c8af5
Merge remote-tracking branch 'supybot/master' into testing
...
Conflicts:
.mailmap
README
docs/FAQ.rst
plugins/Ctcp/plugin.py
plugins/Misc/plugin.py
plugins/Network/plugin.py
plugins/QuoteGrabs/plugin.py
plugins/RSS/README.txt
plugins/Relay/plugin.py
plugins/ShrinkUrl/config.py
plugins/ShrinkUrl/plugin.py
plugins/ShrinkUrl/test.py
setup.py
src/callbacks.py
src/commands.py
src/conf.py
test/test_commands.py
2015-05-15 14:41:08 +02:00
James McCoy
c3695c9419
ircutils: Add formatWhois function
...
Parsing through the various WHOIS replies to build a formatted string
isn't a trivial task, especially since there is some privacy related
information. Consolidate this handling into a single function so
there's one place to fix bugs.
Also fix an issue with people putting (unterminated) formatted text into
the "realname" field of their IRC client (c.f., ProgVal/Limnoria#1083 ).
Signed-off-by: James McCoy <vega.james@gmail.com>
2015-03-26 00:11:36 -04:00
Valentin Lorentz
4470805b5f
core: Remove useless imports.
2015-03-03 09:02:29 +01:00
James Lu
32de4e8270
Merge branch 'testing' into admin/configurable-partmsg
2015-02-07 10:00:48 -08:00
Valentin Lorentz
cb6669015e
Make ircutils.standardSubstitute accept None as irc and msg. (Preliminary for GH-1041.)
2015-02-07 08:15:42 +01:00
James Lu
b243c83e41
Admin/Owner: Use standard substitution for part/quit messages
2015-02-05 20:26:14 -08:00