3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-25 03:59:32 +01:00
Commit Graph

3636 Commits

Author SHA1 Message Date
James Lu
b685f416f6 reverse_modes: treat mode arguments case insensitively 2019-08-26 16:10:08 -07:00
James Lu
0533827ddf reverse_modes: add basic tests 2019-08-26 16:10:02 -07:00
James Lu
32219ccb78 reverse_modes: return a list and not a set of modes
This ensures that order is kept when the input is a list.
2019-08-26 13:16:52 -07:00
James Lu
808e1d1f5a protocol tests: cleanup 2019-08-26 12:59:57 -07:00
James Lu
304631ebd0 Fixes to clientbot._get_UID() behaviour 2019-08-26 12:17:07 -07:00
James Lu
27eed3334b parse_modes: test combinations of nicks and UIDs in prefix modes 2019-08-23 21:24:00 -07:00
James Lu
c1dbfdab48 classes, clientbot: don't allow _get_UID in parse_modes to create new users 2019-08-23 21:22:28 -07:00
James Lu
da58669de5 parse_modes: case fold parameters to modes 2019-08-23 21:01:55 -07:00
James Lu
6ad34672d3 apply_modes: fix statekeeping with current modes mapping 2019-08-23 00:22:25 -07:00
James Lu
46f081e19b apply_modes: treat modes with arguments case-insensitively 2019-08-23 00:11:21 -07:00
James Lu
cb4d2cc384 Add more mode cycling (+b/-b, etc.) tests 2019-08-23 00:11:21 -07:00
James Lu
3eb90fa65c More rigorous testing of +k/-k parsing 2019-08-23 00:11:21 -07:00
James Lu
fe51f71a6e apply_modes: refactor checks for existing modes 2019-08-23 00:10:30 -07:00
James Lu
087ca0947b inspircd: write InspIRCd 3.x in file header 2019-08-22 22:58:34 -07:00
James Lu
a885b79306 More tests for parse_modes(), apply_modes() 2019-08-22 22:58:24 -07:00
James Lu
575cff297d Channel: remove call to deprecated function name 2019-08-22 22:58:15 -07:00
James Lu
e5493eac87 docs/modelists: regenerate & update channel modes list
- channel-modes: split inspircd column into insp20, insp3 sections - this will let us account for current and future differences between the two
- channel-modes: modularize unreal mode list
2019-08-22 21:04:58 -07:00
James Lu
26bfc06869 unreal: get rid of weird cmode +f workaround 2019-08-22 21:02:30 -07:00
James Lu
d3f2a370da Revert "inspircd: don't allow _ in hosts"
This reverts commit ac8b7babf1.
2019-08-22 19:02:59 -07:00
James Lu
a8832a5f93 modelists: update extban listing 2019-08-22 19:00:39 -07:00
James Lu
0b8ed2dae9 unreal: declare support for msgbypass and timedban extbans
Closes #557.
2019-08-22 18:48:46 -07:00
James Lu
452a47d4f1 relay: handle acting extbans for +e too
InspIRCd acting extbans and UnrealIRCd ~m are both used in theis context.
2019-08-22 18:40:23 -07:00
James Lu
d57b121600 unreal: work around a potential race when sending kills on join
(cherry picked from commit 1780271dd0)
2019-08-22 17:46:15 -07:00
James Lu
e0a618f317 [SECURITY] permissions: only whitelist the defined login:user for legacy accounts
It's possible for login:user and login:accounts to be used together, although this is discouraged.

(cherry picked from commit 4eb0420378)
2019-08-22 17:46:15 -07:00
James Lu
e02ab9f2ff 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

(cherry picked from commit 9a74626d62)
2019-08-22 17:46:15 -07:00
James Lu
2cdcd8e193 clientbot: fix error when MODES is defined in ISUPPORT but given no value
(cherry picked from commit 61ca8dd781)

This fixes connections to e.g. Oragono
2019-08-22 17:46:15 -07:00
James Lu
fae63d77b2 README: mention that ngIRCd's CloakHost and CloakUserToNick are not supported
Cloak tools that enforce hosts on remote users are by nature unsupportable because they cause hostmask desyncs when forwarding Relay users. This in turn makes channel moderation impossible.

[skip ci]

(cherry picked from commit 1a692f55ad)
2019-08-22 17:44:16 -07:00
James Lu
f3569b4fd9 ts6: add support for hiding PyLink servers 2019-08-22 17:39:00 -07:00
James Lu
5d579481aa Base protocol tests for _get_UID, parse_modes 2019-08-18 20:55:10 -07:00
James Lu
6b78b45b20 ngircd: make linking to non-ngIRCd servers a fatal error 2019-08-18 19:51:37 -07:00
James Lu
1a692f55ad README: mention that ngIRCd's CloakHost and CloakUserToNick are not supported
Cloak tools that enforce hosts on remote users are by nature unsupportable because they cause hostmask desyncs when forwarding Relay users. This in turn makes channel moderation impossible.

[skip ci]
2019-08-18 19:50:48 -07:00
James Lu
4a8c96c883 And now, a test fixture for protocols/ 2019-08-18 16:36:02 -07:00
James Lu
07d8c8828a relay: fix incorrect variable when logging invalid channels in LINK
Where on earth is c even defined?
2019-08-04 11:41:28 -07:00
James Lu
80188c3673 Sort imports via isort 2019-07-14 15:12:29 -07:00
James Lu
19d794a6f5 relay_clientbot: refactor 'rpm' to handle duplicate nicks & nicks containing spaces
Closes #650.
2019-07-14 13:21:47 -07:00
James Lu
6ac2daebfa commands: improvements to the 'showuser' command
- Indent output lines for each specific user
- Skip showing Home server / Nick TS line if neither is available
- Handle nicks with spaces in them
- Show user modes after basic details
2019-07-14 13:21:47 -07:00
James Lu
8e85fa935d PyLink 2.1-alpha2 2019-07-14 12:29:35 -07:00
James Lu
350ba5f89c Changelog draft for 2.1-alpha2
[skip ci]
2019-07-13 02:16:29 -07:00
James Lu
edd27eea41 relay: format KILL sources when relaying local kills
Kill reason formatting was changed in #520.
2019-07-01 14:18:35 -07:00
James Lu
bcdd26926d IRCNetwork: use bytearray for buffers 2019-07-01 14:18:35 -07:00
James Lu
4bd334e2b8 antispam: read nicks from userdata when handling QUITs (#617)
get_hostmask() doesn't work on someone who has already quit.
2019-07-01 14:18:31 -07:00
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