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

3377 Commits

Author SHA1 Message Date
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
James Lu
f12318b5dc classes: add an is_channel argument to _parse_modes
This is required for the following commit.
2018-03-02 20:56:59 -08:00
James Lu
1413aa6042 _apply_modes: don't add prefix modes to mode sets even when prefixmodes=None 2018-03-02 20:47:41 -08:00
James Lu
054680c806 classes: split apply_modes into two functions 2018-03-02 20:43:25 -08:00
James Lu
9cca695d14 classes: split parse_modes into core and wrapper functions 2018-03-02 20:43:25 -08:00
James Lu
d172831805 conf: rename methods to snake case (#523) 2018-03-02 20:23:48 -08:00
James Lu
03103bea14 conf: use a more informative description for validate() 2018-03-02 20:23:47 -08:00
James Lu
87fdb1dde1 opercmds: migrate from utils.isServerName to irc.is_server_name 2018-03-02 20:23:47 -08:00
James Lu
9e212fc0a4 protocols: migrate utils.wrapArguments, splitHostmask use to camel case (#523) 2018-03-02 20:23:47 -08:00
James Lu
3e656cd943 utils: mark reset_module_dirs, load_plugin, get_protocol_module as private 2018-03-02 20:23:47 -08:00
James Lu
1cdf16f5c9 various: migrate utils.loadPlugin, getProtocolModule, resetModuleDirs calls to snake-case (#523) 2018-03-02 20:23:47 -08:00
James Lu
bea2ea8ebd plugins, coremods: migrate (un)registerService calls to snake case (#523) 2018-03-02 20:23:47 -08:00
James Lu
9e3f412f0b log: rename methods to snake case (#523) 2018-03-02 20:23:47 -08:00
James Lu
ad5a11bf34 control: skip networks that fail to initialize on rehash
This follows the launcher fix in 8321485315.
2018-03-02 20:23:47 -08:00
James Lu
a2783d74c5 unreal: bump protocol version to 4017 (no changes needed) 2018-03-02 20:23:47 -08:00
James Lu
1c3f71ac1b servermaps: assign servermaps.localmap to all opers 2018-03-02 16:18:55 -05:00
James Lu
d5d94f86e8 servermaps: split into two perms (servermaps.map and servermaps.localmap) 2018-03-02 16:14:04 -05:00
James Lu
6a90e99de4 IRCNetwork: do not break on socket BlockingIOError
On non-blocking sockets, recv() raises BlockingIOError instead of blocking when there's no data to be read.
The correct behaviour is to wait and try again instead of breaking the connection.
2018-03-01 12:52:41 -05:00
James Lu
e8e26daf05 ctcp: fix wrong logging format for unknown CTCPs 2018-03-01 02:48:04 -05:00
James Lu
5d25b3c105 ctcp: remove extraneous keyword argument
private is not defined in irc.msg()
2018-02-25 14:29:19 -05:00
James Lu
3c0809dce0 ctcp: don't use irc.reply in hook functions
This is undefined behaviour because nothing in this stack actually updates the 'last caller' variables irc.reply() use.
2018-02-24 14:19:57 -05:00