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

3497 Commits

Author SHA1 Message Date
James Lu
1fbe3c6891 relay: sync whitelisted mode lists with 2.0-alpha3 2018-03-30 11:21:15 -07:00
James Lu
209fa9722c inspircd: move definitions for cmodes +J and +E to kicknorejoin_insp and repeat_insp
These use InspIRCd specific arguments which don't map cleanly to other IRCds. #559

(cherry picked from commit ec3b230eab)
2018-03-30 11:20:41 -07:00
James Lu
597685d77c relay_clientbot: fix @#channel messages not being treated as channel-specific
This is a lighter version of the more comprehensive fix in 2.0[1], which
depends on reworked STATUSMSG handling in relay.

[1]: https://github.com/GLolol/PyLink/commit/57334183
2018-03-30 11:14:56 -07:00
James Lu
a24d4d5b9c example-conf: sort clientbot ex. options so that cb-specific ones are at the end
(backported from commit 0c2927fb1e)
2018-03-30 11:00:53 -07:00
James Lu
59d52920f3 example-conf: revise the example servers: section
- Remove "8P#" as a sidrange default - it does not leave adequate room for larger networks
- Move the TS6 example to near the end; it has less demand than Unreal and P10
- Consistently use "must" to describe P10 cloaking options, where any misconfiguration will lead to serious desyncs
- Bumped example autoconnect times from 5 to 10 seconds
- Add the 'netname' option to server blocks that previously didn't include it
- Comment out the 'channels' setting on each server example by default
- Various wording clarifications

(backported from commit 390b7a327a)
2018-03-30 11:00:53 -07:00
James Lu
77eb9b4060 example-conf: revise notes for P10, TS6 servers
Backport commit 3d61bfd114 from 2.0.
2018-03-30 11:00:53 -07:00
James Lu
6d08e0b953 docs: various fixes pointed out by @MrBenC
- Clarify the project's goals of being an IRC services *framework*
- Briefly mention in the FAQ that the relay plugin is needed for...well, relay!

[skip ci]

(cherry picked from commit 484822e5d7)
2018-03-30 11:00:53 -07:00
James Lu
f274088ea0 classes: more checks on _aborted to (hopefully) prevent duplicate disconnects triggered by _send 2018-03-30 10:47:34 -07:00
James Lu
93d590fdea UserMapping: check for lower_nick rather than isinstance(userobj, User)
This makes classes reload-safe again.
2018-03-30 10:46:49 -07:00
Jordy Zomer
7a1dcbd460 Use yaml.safe_load instead of yaml.load to prevent executing arbitrary code (#589) 2018-03-29 14:12:32 -07:00
Jordy Zomer
be8e4be49d Use yaml.safe_load instead of yaml.load to prevent executing arbitrary code (#589) 2018-03-29 14:10:33 -07:00
James Lu
335fb352ec classes: ignore errors on duplicate selector.unregister()
This should really be fixed more thoroughly: there are still some remaining issues after the port to select, with disconnect / reconnect being triggered twice.
2018-03-29 14:04:58 -07:00
James Lu
29cda543e4 launcher: use a clearer description for --trace 2018-03-24 01:07:24 -07:00
James Lu
22b2410913 RELNOTES: mention new --trace arguments for 2.0-alpha3 2018-03-24 01:05:47 -07:00
James Lu
22f781189d Refresh 2.0-alpha3 changelog with engine-rework batch 2 changes so far 2018-03-24 01:02:55 -07:00
James Lu
84187a07ec Refresh 2.0-alpha3 changelog (up to 815535d76b) 2018-03-24 01:02:14 -07:00
James Lu
0bc24c94b2 relay: shortcut get_remote_user some more; only grab spawn lock if the user doesn't exist 2018-03-24 00:31:15 -07:00
James Lu
bbb36cd956 relay: reuse get_relay_server_sid output when bursting groups of users 2018-03-24 00:25:05 -07:00
James Lu
a085aed924 Rework irc.users and User() to transparently create a store of nicks -> UIDs
- This turns IRCNetwork.users into a new UserMapping class, which stores User objects by UID (str) and provides a 'bynick' dict storing case-normalized nicks to lists of UIDs.
- Turn User.nick into a property, where the setter implicitly updates the 'bynick' index and computes a case-normalized version of the nick (User.lower_nick)
2018-03-24 00:12:19 -07:00
James Lu
815535d76b IRCNetwork: fix autoconnect not applying when socket.connect() fails 2018-03-23 20:21:49 -07:00
James Lu
814dd9a3c5 IRCNetwork: only register a socket with selectdriver after connecting 2018-03-23 20:16:59 -07:00
James Lu
ec8f744449 relay: only look up nick once in normalize_nick 2018-03-22 22:45:40 -07:00
James Lu
bb1334696c classes: cache more of to_lower() 2018-03-22 22:03:08 -07:00
James Lu
c11a476257 Revert "selectdriver: actually, force a disconnect when _run_irc() fails"
This reverts commit f10f5bee52.
2018-03-22 21:21:33 -07:00
James Lu
b522967760 Fix duplicate calls to _run_autoconnect 2018-03-22 17:42:28 -07:00
James Lu
f10f5bee52 selectdriver: actually, force a disconnect when _run_irc() fails 2018-03-21 21:07:44 -07:00
James Lu
989259af97 selectdriver: don't crash if _run_irc hits an error 2018-03-21 20:14:27 -07:00
James Lu
5172841378 launcher: add support for tracing (most of) PyLink's execution 2018-03-17 16:13:35 -07:00
James Lu
91b86ce0e4 Remove structures.DeprecatedAttributesObject, it's vastly inefficient for what it accomplishes 2018-03-17 15:49:48 -07:00
James Lu
fb6c3bf6d5 selectdriver: don't try to deregister dead sockets 2018-03-17 15:33:39 -07:00
James Lu
ab70d7c8fb selectdriver: stop delivering events when _aborted is set 2018-03-17 15:27:35 -07:00
James Lu
8100a4cea6 IRCNetwork: run _run_autoconnect in a thread so it doesn't block whatever calls disconnect() 2018-03-17 15:26:36 -07:00
James Lu
30bcd8ca79 control: remove check for _connection_thread (removed in select rework) 2018-03-17 12:18:34 -07:00
James Lu
0151f77f7b Don't clear the read buffer with every _run_irc call 2018-03-17 12:18:16 -07:00
James Lu
10d2fb93ed classes: fix syntaxerror from merge 2018-03-17 11:06:02 -07:00
James Lu
0033612fa3 Merge branch 'devel' into engine-rework
Conflicts:
	classes.py
2018-03-17 11:03:58 -07:00
James Lu
f7ab2564fe Rework inbound connection handling to use select
Closes #588.
2018-03-17 11:01:32 -07:00
James Lu
180bfa9917 relay: don't spam ulines with "notice failed" errors 2018-03-17 10:27:56 -07:00
James Lu
5bffe67416 relay: bandaid patch for freezes on startup when there are a ton of networks
The side effect of this patch is that it makes large bursts *really* CPU intensive. A proper fix for this will hopefully be introduced in the future.
2018-03-11 21:26:37 -07:00
James Lu
b7b49769e0 relay: silently abort if a network splits while we try to spawn a server or client 2018-03-11 21:25:42 -07:00
James Lu
5733418380 relay_cb: bandaid fix to prevent STATUSMSG messages from being interpreted as non-channel specific 2018-03-10 19:54:33 -08:00
James Lu
b6bac994c6 servermaps: show the uplink server name for Clientbot links 2018-03-07 22:28:34 -08:00
James Lu
92460716d1 IRCNetwork: bump SOCKET_REPOLL_WAIT to 1 sec 2018-03-07 18:32:20 -08:00
James Lu
ccc9f8e5c8 IRCNetwork: also catch ssl.SSLWantReadError and ssl.SSLWantWriteError 2018-03-07 18:31:43 -08:00
James Lu
8f9b56e9d9 IRCNetwork: abort when _send() fails to avoid deadlocks 2018-03-07 18:30:14 -08:00
James Lu
c49147f232 stats: route permission error replies to notice and not privmsg
This prevents "unknown command" flood loops with stats services which poll these on link.
2018-03-04 12:11:50 -08:00
James Lu
57f77c676d relay: don't show the network name when routing kicks through a server
This is redundant, as relay has always spawned subservers for quite some time now.
2018-03-02 21:42:25 -08:00
James Lu
9f39e484da Merge branch 'mode-rework' into devel 2018-03-02 21:34:09 -08:00
James Lu
0ca185fada classes: fix some prefixmodes list vs. state confusion 2018-03-02 21:07:47 -08:00
James Lu
5a00454a8d _parse_modes: apply modes to a temporary mode list as we parse them
Fixes #573.

Old, broken behaviour:
irc.parse_modes('#test', '+b-bb *!*@new.ban *!*@nonexistent.ban *!*@new.ban')
=> [('+b', '*!*@new.ban')]

Fixed:
irc.parse_modes('#test', '+b-bb *!*@new.ban *!*@nonexistent.ban *!*@new.ban')
=> [('+b', '*!*@new.ban'), ('-b', '*!*@new.ban')]
2018-03-02 20:57:16 -08:00