3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-01 17:29:21 +01:00
Commit Graph

3645 Commits

Author SHA1 Message Date
James Lu
e3e0eac747 classes: revise docstrings
Mostly, mention which methods are IRC specific and which should be overridden to support other platforms.
2019-07-01 14:17:26 -07:00
James Lu
c7fd037879 Revise handling of KILL and QUIT hooks
- Both of these now always contain a non-empty userdata argument.
- If we receive both a KILL and a QUIT for any client, only the one received first will be sent as a hook.
- Also, adjust _remove_client() to return the data of the user that was removed.
2019-07-01 13:36:53 -07:00
James Lu
35b38dfb05 antispam: add part / quit message filtering for plugins like Relay
Closes #617.
2019-06-27 13:07:04 -07:00
James Lu
b6cf09ae52 example-conf: fixes to antispam examples
- It should be servers::<server name>::antispam_textfilter_globs, not servers::<server name>::antispam_textfilters_globs
- Matches (via utils.match_text) are Unicode case-insensitive as of PyLink 2.1
2019-06-27 13:07:04 -07:00
James Lu
93f608a504 writing-plugins: mention that editing hook payloads is allowed
Part of #452.
2019-06-27 13:07:02 -07:00
James Lu
9ad2b03833 permissions-reference: briefly mention (pi)eval, iexec commands 2019-06-26 13:54:32 -07:00
James Lu
19c7dce931 commands: add a 'shownet' command
Basic info available to everyone include network name, protocol module, and encoding.

For those with the commands.shownet.extended permission, this also allows looking up disconnected networks defined in the config, and shows configured IP:port, PyLink hostname, SID, and SID range.

Closes #578.
2019-06-26 13:54:32 -07:00
James Lu
37822fda42 inspircd: implement spawn_server() on InspIRCd 3 (#644) 2019-06-26 13:54:25 -07:00
James Lu
4eb0420378 permissions: only whitelist the defined login:user, not all accounts
It's possible for login:user and login:accounts to be used together, although this is discouraged.
2019-06-26 13:18:32 -07:00
James Lu
9a74626d62 relay: consistency fixes for the hideoper setting
- Don't enforce +H on /oper when the hideoper option is disabled
- Skip relaying -H if the hideoper option is enabled - closes #629
2019-06-26 13:18:32 -07:00
James Lu
c1158fd33a exttargets: convert $account target to str before matching
Closes #639.
2019-06-26 13:18:32 -07:00
James Lu
caa94f983f relay: mangle <( to [ and >) to ] for better displays 2019-06-24 15:08:13 -07:00
James Lu
729abbd6bf Update dependency definitions
- Make cachetools a hard dependency - closes #648
- Mark unidecode as an optional dependency for Relay - #561
2019-06-24 15:03:51 -07:00
James Lu
61ca8dd781 clientbot: fix error when MODES is defined in ISUPPORT but given no value 2019-06-23 20:13:04 -07:00
James Lu
df468064d6 clientbot: rework to support freeform nicks
By overriding _get_UID() to only return non-virtual clients, we can stop worrying about nick conflicts and remove relay nick tags from Clientbot.
2019-06-23 19:46:23 -07:00
James Lu
c56713887e classes: use _get_UID in parse_modes() to allow overriding nick lookup behaviour 2019-06-23 19:45:29 -07:00
James Lu
798fc7b0bf match_host: stop implicitly coersing target nicks to UIDs 2019-06-23 19:45:08 -07:00
James Lu
1852ff5774 relay: passthrough nicks in normalize_nick() on server supporting freeform-nicks 2019-06-23 17:48:15 -07:00
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