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

483 Commits

Author SHA1 Message Date
James Lu
a79354cd52 apply_modes: fix removing multiple ban modes in one command 2019-12-22 23:57:36 -08:00
James Lu
44770fb6d1 classes: fix SyntaxWarning: "is" with a literal on Python 3.8 2019-12-22 23:11:58 -08:00
James Lu
b495cb4c5e classes: clean up _expandPUID
Also make the logging less noisy.
2019-12-22 22:14:26 -08:00
James Lu
b1b14dfb55 classes: disable logging about modes by default 2019-12-22 22:14:26 -08:00
James Lu
e0d82cdf3d Add get_service_options API to merge together global & local network options
First part of #642.
2019-10-10 18:49:07 -07:00
James Lu
c8ba6291a6 parse_irc_command: ignore empty IRC lines
I seem to be getting this on my InspIRCd 2 test server?
2019-09-10 19:46:46 -07:00
James Lu
083dc6a58f Rewrite is_server_name() to fail on hostnames with - and _ 2019-09-10 19:31:57 -07:00
James Lu
a1f3af9099 reverse_modes: deduplicate reversing modes with arguments 2019-08-26 16:10:08 -07:00
James Lu
9168880204 parse_modes: fix handling of +b-b ban cycles 2019-08-26 16:10:08 -07:00
James Lu
c2b5966739 reverse_modes: ignore unsetting simple modes that didn't exist 2019-08-26 16:10:08 -07:00
James Lu
b685f416f6 reverse_modes: treat mode arguments case insensitively 2019-08-26 16:10:08 -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
304631ebd0 Fixes to clientbot._get_UID() behaviour 2019-08-26 12:17:07 -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
fe51f71a6e apply_modes: refactor checks for existing modes 2019-08-23 00:10:30 -07:00
James Lu
575cff297d Channel: remove call to deprecated function name 2019-08-22 22:58:15 -07:00
James Lu
80188c3673 Sort imports via isort 2019-07-14 15:12:29 -07:00
James Lu
bcdd26926d IRCNetwork: use bytearray for buffers 2019-07-01 14:18:35 -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
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
9f31a0a587 classes: drop use of ircmatch (#636) 2019-06-21 12:51:12 -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
2c028e2762 classes: remove channels, modes from User.get_fields()
These don't really make sense to be formatted as a string.
2019-03-28 20:14:04 -07:00
James Lu
190e51211f log: use pylinkirc as logger name 2019-02-20 13:22:26 -08:00
James Lu
4f17a7986b PyLinkNC: don't overwrite sid, serverdata if they're already set 2019-02-20 13:22:26 -08:00
James Lu
55360dd0b2 classes: allow Server name to be a non-string type 2019-02-16 16:32:42 -08:00
James Lu
cfbadb4539 Move _squit, _get_SID, _get_UID wrappers into PyLinkNCWUtils
ClientbotBaseProtocol requires these for the squit wrapper to work.
2019-02-12 00:38:37 -08:00
James Lu
a9b8bfe94d classes: allow _expandPUID() to work when UIDs are ints 2019-02-10 13:01:11 -08:00
James Lu
5731a301ce classes: fix incorrect wrap_messages() stub 2019-02-10 13:00:53 -08:00
James Lu
6e7c58ee36 PyLinkNCWithUtils: don't assume mode args are strings 2019-02-07 14:55:27 -08:00
James Lu
61c8677802 classes, relay_clientbot: more type safety for protocols/discord 2019-02-07 13:50:32 -08:00
James Lu
94a345423e classes: allow callers to override the make_channel_ban() ban style 2018-10-20 12:34:11 -07:00
James Lu
eb231a2aad classes: always raise an error if make_channel_ban creates something invalid 2018-10-20 12:33:42 -07:00
James Lu
6ceaabe092 classes: use get_fields() in make_channel_ban() for more reliable substitutions 2018-10-20 12:30:09 -07:00
James Lu
5c4fba653f IRCNetwork: disable throttling by default
On large networks, this seems to slows down relay bursts to the point they're no longer usable.
2018-10-10 22:49:10 -07:00
James Lu
12d1412cba PyLinkNCWUtils: stop logging the entirety of prefixmodes
This creates a lot of spam on larger channels.
2018-10-10 22:49:04 -07:00
James Lu
60b7894cd6 IRCNetwork: try to abort immediately if the send queue is full 2018-10-08 16:26:29 -07:00
James Lu
8a096e537c PyLinkNCWUtils: add "ignore_ts_errors" server option to suppress bogus TS warnings 2018-08-23 02:52:54 -04:00
James Lu
49badd1665 updateTS: silently ignore messages with ts = 0
Closes #625.
2018-08-19 19:41:29 -04:00
James Lu
5e1cb232b0 IRCNetwork: also detect address types from supplied bindhosts 2018-06-15 18:43:00 -07:00
James Lu
26361c4cc9 IRCNetwork: warn when using plaintext links to non-local addresses 2018-06-15 18:30:21 -07:00
James Lu
e5f817fc95 IRCNetwork: suppress "You can enhance...security...[with] ssl_fingerprint" notices when TLS cert validation is enabled 2018-06-15 15:57:45 -07:00
James Lu
ab9df93898 IRCNetwork: more consistent log format when remote certfp is verified 2018-06-15 15:52:04 -07:00
James Lu
b26d75a6a8 IRCNetwork: handle the case when certificate fingerprint checking is on but the remote provides no cert 2018-06-15 15:50:32 -07:00