3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-12-29 14:12:39 +01:00
Commit Graph

3677 Commits

Author SHA1 Message Date
James Lu
30f7a77d18 Revert most of 1c0ea24acd
1c0ea24acd "relay_clientbot: normalize sender names to the senders' home networks"

In the future we hope to remove nick restrictions in Clientbot entirely, and just use freeform nicks for virtual users.
2019-06-23 17:48:08 -07:00
James Lu
957697d275 networks: don't allow disconnecting servers marked virtual-server 2019-06-23 17:43:12 -07:00
James Lu
c5b94cdf21 control: ignore virtual servers in rehash 2019-06-23 17:39:15 -07:00
James Lu
f2b6de8889 Declare new protocol capabilities: virtual-server, freeform-nicks 2019-06-23 17:29:43 -07:00
James Lu
ed4404bf4b relay: fake revert mode changes we couldn't bounce (#23)
This allows services to revert mode changes CLAIM was not happy with, instead of causing another mode war during this process.
2019-06-21 15:38:49 -07:00
James Lu
dcab011673 relay: pretend mode reverts on SJOIN always succeed (#23)
This prevents remote services from bypassing CLAIM, since the end result of a mode war is that they remained opped.
2019-06-21 15:28:52 -07:00
James Lu
94cd1d8f22 relay: implement kick/mode/topic war prevention (#23)
This adds cachetools as a dependency for Relay.
2019-06-21 14:57:43 -07:00
James Lu
042d11d7ba relay: remove extraneous variable 2019-06-21 14:03:21 -07:00
James Lu
a6205e1ebc README, setup.py: drop ircmatch dependency (#636) 2019-06-21 12:51:12 -07:00
James Lu
74566c3aab antispam, changehost: remove references to ircmatch (#636) 2019-06-21 12:51:12 -07:00
James Lu
9f31a0a587 classes: drop use of ircmatch (#636) 2019-06-21 12:51:12 -07:00
James Lu
b7d93fe86a utils: add match_text(), general glob matching function
In preparation for ircmatch removal (#636)
2019-06-21 12:51:12 -07:00
James Lu
46d1738f66 example-conf: mention PyLink 2.0.3 instead of 2.1 for CryptContext changes 2019-06-16 11:39:07 -07:00
James Lu
6054476900 More secure password hashing defaults
(cherry picked from commit eba5d91299)

  Default hash method to pbkdf2-sha256 & allow customizing CryptContext options

  This introduces a new login::cryptcontext_settings config option.

  Closes #645.
2019-06-16 11:36:34 -07:00
James Lu
c7e4c05cbd changehost: only send a host change if new host != original
(cherry picked from commit 13be40e08b)
2019-06-16 11:36:34 -07:00
James Lu
e25a5df4db ClientbotBaseProtocol: disallow part() from the main pseudoclient by default 2019-06-16 11:24:45 -07:00
James Lu
0836845ff9 Merge relay showchan/showuser info into commands.py
This makes error handling easier and is needed to support duplicate nicks anyways.
2019-06-16 11:22:36 -07:00
James Lu
dfc4e4954a commands: remove explicit cutoff of 20 users/line in showchan
irc.reply() in PyLink 2.0+ handles line wrapping automatically.
2019-06-16 11:20:26 -07:00
James Lu
fe95a4a571 commands: rework showuser to better handle duplicate nicks
This is freely allowed on Discord, for example.
2019-06-16 11:19:19 -07:00
James Lu
fc4a16eda1 bots, opercmds: handle cases where target nick is disambiguous 2019-06-16 11:04:07 -07:00
James Lu
242267a4a2 classes: revise some function descriptions 2019-06-16 10:31:23 -07:00
James Lu
011d70e816 classes: make nick_to_uid more versatile against duplicate nicks
This adds a couple of new options:
- multi: return all matches for nick instead of just the last result. (Return an empty list if no matches)
- filterfunc: if specified, filter matched users by the given function first."""
2019-06-16 10:30:46 -07:00
James Lu
3b07f8ab2b fantasy: accept "@servicebot" as fantasy trigger prefix
For platforms like Discord where this form of address is the norm.

Closes https://github.com/PyLink/pylink-discord/issues/17
2019-06-15 23:56:55 -07:00
James Lu
3d039b78e2 relay: use [] as altchars for Base64 fallback
This ensures that mangled nicks can be reversed more easily (by removing leading _'s and replacing - with =)
2019-06-15 23:48:46 -07:00
James Lu
886a98a396 Drop official support for Python 3.4
Our lowest support target is now Python 3.5 (Debian 9, Ubuntu 16.04)
2019-06-07 14:34:04 -07:00
James Lu
c62ec4fde0 setup.py: move from expiringdict to cachetools (#445) 2019-06-07 14:31:04 -07:00
James Lu
3d5e7cd1c1 pylink-mkpasswd: use hash() instead of encrypt()
- This function was renamed in Passlib 1.7, deprecating the old name.

- Depend accordingly on Passlib >= 1.7.0
2019-06-07 14:25:22 -07:00
James Lu
eba5d91299 Default hash method to pbkdf2-sha256 & allow customizing CryptContext options
This introduces a new login::cryptcontext_settings config option.

Closes #645.
2019-06-07 14:13:39 -07:00
James Lu
8b298df362 example-conf: various wording tweaks (SSL -> TLS, etc.) 2019-06-06 23:57:01 -07:00
James Lu
42a2061783 Merge branch 'wip/insp3' into devel
protocols/inspircd: add native support for InspIRCd 3.x

Closes #644.
2019-06-06 23:54:57 -07:00
James Lu
dd58dcf377 inspircd: show a note when linking to insp3 servers using insp20 compat 2019-06-06 23:50:08 -07:00
James Lu
04d36e93a1 inspircd: document target_version variable 2019-06-06 23:49:27 -07:00
James Lu
2b04050bf5 inspircd: minor cleanup 2019-05-31 19:01:25 -07:00
James Lu
8d2ae6af50 example-conf: rewrap comments for the first server example 2019-05-31 18:44:07 -07:00
James Lu
762b47120d inspircd: support insp3 INVITE 2019-05-31 18:28:28 -07:00
James Lu
722881bc33 inspircd: fix incorrect lstrip() usage when mangling mode names 2019-05-31 18:13:21 -07:00
James Lu
917543dd12 inspircd: burst shorter version strings on insp3
These get shown in /map, for example.
2019-05-31 18:13:15 -07:00
James Lu
b260a28c8f inspircd: handle insp3 SERVER command 2019-05-31 18:12:06 -07:00
James Lu
12784a4b5b inspircd: handle insp3 IJOIN with TS & flags 2019-05-31 17:46:36 -07:00
James Lu
ea753774fd inspircd: check for local protocol version instead of the remote's
We should be speaking the insp20 protocol even to insp3 servers if configured to do so, not some broken hybrid of the two.
OPERTYPE handling remains an exception.
2019-05-31 17:35:49 -07:00
James Lu
1c0ea24acd relay_clientbot: normalize sender names to the senders' home networks
This should work for most messages, except NICK changes and MODE targets.
2019-05-18 19:44:45 -07:00
James Lu
50e9d2d959 example-conf: load servprotect by default 2019-05-13 17:08:11 +08:00
James Lu
26fa5d38a2 README: update list of optional dependencies (#445) 2019-05-13 17:07:50 +08:00
James Lu
ec379a6e81 servprotect: migrate to cachetools (but leave expiringdict as fallback)
Closes #445.
2019-05-13 16:59:57 +08:00
James Lu
c43d13ef61 inspircd: FTOPIC handling for InspIRCd 3 2019-05-02 18:05:54 -07:00
James Lu
66485ec6a2 inspircd: send SINFO instead of VERSION on 1205 2019-05-02 17:42:45 -07:00
James Lu
3d69b7f4e8 ircs2s_common: fix sending the wrong target in PING 2019-05-02 17:36:42 -07:00
James Lu
ad4cb9561c inspircd: add FJOIN, IJOIN, KICK handling for InspIRCd 3
IJOIN is new. Strip membership IDs from incoming FJOIN and KICK for now.
2019-05-02 17:36:42 -07:00
James Lu
08386a8ef7 inspircd: get rid of MIN_PROTO_VER
We should always check that our remote has a protocol version >= our own.

i.e. support links using PyLink 1202 <-> InspIRCd 1205, PyLink 1205 <-> InspIRCd 1205, but NOT PyLink 1205 <-> InspIRCd 1202
2019-05-02 17:36:42 -07:00
James Lu
db6d5d6d05 inspircd: actually read our DEFAULT_IRCD setting 2019-05-02 17:36:38 -07:00