3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-12-27 05:03:07 +01:00
Commit Graph

178 Commits

Author SHA1 Message Date
James Lu
108d4b86d9 login: fix login for legacy accounts (#590) 2018-05-26 01:27:12 -07:00
James Lu
9e936f1612 Rewrite login handling (Closes #590)
* Move identify command and login helpers into coremods.login
   - corecommands._login -> login._irc_try_login
* Add login._get_account() function to consistently fetch login block info
* Rename functions in coremods.login to snake case:
   - checkLogin -> check_login
   - verifyHash -> verify_hash
* Replace explicit returns in login checks with raising utils.NotAuthorizedError()
2018-05-25 23:50:55 -07:00
James Lu
c44aa64503 services_support: check service bot state, not is_internal_client before dynamically parting channels
If a channel still has e.g. relay users when the last local user leaves the channel, the services bots should stay put.
2018-05-09 20:47:51 -07:00
James Lu
2532042506 services_support: raise endburst handler priority
Other plugins may implement endburst handlers assuming that their service bots have already been created.
2018-05-05 13:07:28 -07:00
James Lu
01c22aac21 Revert "service_support: consistently rejoin all channels on kick and kill"
This is no longer needed with plugin-specific persistent channels.

This reverts commit 3c9dac7e6b.
2018-05-05 13:07:07 -07:00
James Lu
0ead868546 service_support: skip dynamic join/part hooks on bot-only servers 2018-04-20 19:35:06 -07:00
James Lu
3c9dac7e6b service_support: consistently rejoin all channels on kick and kill
This is the cheap fix to part one of #265: "When a services client is killed, it won't join any relay leaf channels"
2018-04-13 20:34:26 -07:00
James Lu
2f12a5b710 Initial work on dynamic service bot joining / parting (#265) 2018-04-12 12:45:33 -07:00
James Lu
c7159b9cad core: move clearing channels on kick/part to coremods/handlers
This is for consistency with the rest of the state cleanup code.
2018-04-07 22:44:00 -07:00
James Lu
16faac83eb core: delete empty permanent channels when -P is set on them 2018-04-07 22:38:19 -07:00
James Lu
d6952f0361 handlers: fix names of state cleanup function
Where did "stats cleanup" even come from?!
2018-03-31 00:09:30 -07:00
James Lu
310ad345a3 SECURITY: normalize account names before checking network / oper filters
(cherry picked from commit a6c1beaad0)
2018-03-30 11:59:29 -07:00
James Lu
22efe1384c _login: tweak error message: opered up => opered
(cherry picked from commit 557f1578bc)

Conflicts:
	coremods/corecommands.py
2018-03-30 11:58:50 -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
d172831805 conf: rename methods to snake case (#523) 2018-03-02 20:23:48 -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
e446e0e27b control: continue handling SIGUSR1 as rehash for compat with older 2.0 versions 2018-01-21 13:36:29 -08:00
James Lu
44be5910e0 Revert "control: move rehash signal to SIGUSR1, and shutdown on SIGHUP (terminal close)"
This wasn't an incredibly popular decision because it broke a simple 'pylink &'

This reverts commit 883f9199ec.

Conflicts:
	coremods/control.py
2018-01-21 13:31:15 -08:00
James Lu
8490bee634 handlers: pick the highest prefix when displaying status in WHOIS
This fixes a regression from aa44bc15a3
2017-12-12 12:46:43 -08:00
James Lu
d4cbf1d2af services_support: fix rejoin-on-kill to the main service bot
Clear the irc.pseudoclient state on kill as the respawning code will check for it first and reuse UIDs even if they don't exist.
2017-11-12 10:54:30 -08:00
James Lu
d0dff2c5ae Move permission enumeration to runtime, fix default perms not applying at startup
Closes #542.
2017-10-22 00:08:16 -07:00
James Lu
eca40a3d7c coremods/handlers: implement cleanup code for visible-state-only servers
Closes #536.
Closes #517.
2017-10-07 21:49:17 -07:00
James Lu
2535aa145f corecommands: fix unloading plugins that define hooks
This fixes a regression from 5e92aefcd4.
2017-09-23 13:39:13 -07:00
James Lu
ae06484aea exttargets: tweak docstring syntax for better readability 2017-09-05 19:19:44 -07:00
James Lu
d3892a85be Add $service exttarget for matching service bots 2017-09-05 19:19:01 -07:00
James Lu
5e92aefcd4 Implement priorities in utils.add_hook()
This changes world.hooks to store lists of tuples indicating (priority, hook_func).
2017-09-02 21:17:50 -07:00
James Lu
82a7b914b6 Move control.tried_shutdown to world.shutting_down 2017-08-31 13:36:50 -07:00
James Lu
94e05a6233 services_support: fix clientbot service spawning when irc.pseudoclient exists but isn't in the user index 2017-08-30 19:50:25 -07:00
James Lu
cad55097f1 core: reuse existing service client UIDs for all service bots
This prevents nick collision wars caused by spawn_service when an ENDBURST hook for the uplink is received multiple times.
2017-08-30 19:29:46 -07:00
James Lu
d79f1766b6 classes, coremods: migrate to irc.is_* 2017-08-28 20:13:25 -07:00
James Lu
ba649fb8b4 utils, exttargets: add checks for channel presence 2017-08-25 02:31:26 -07:00
James Lu
0bb4a35c6f Support pre-auth irc.pseudoclient enumeration & configurable altnicks
Closes #516. Closes #288.
2017-08-21 23:05:56 -07:00
James Lu
89699051d5 Services API rework
- Move nick/ident/host/gecos fetching from services_support into functions
- Remove the unused 'ident' argument from ServiceBot
- Rename the 'nick' argument in ServiceBot to 'default_nick'
- Define default nicks for the PyLink, Automode, and Games services
2017-08-21 21:51:45 -07:00
James Lu
d818c17072 control: don't spew "Stopping plugins" notices if none are loaded 2017-08-16 12:17:19 -07:00
James Lu
3b6c1e56c4 launcher: move reset_permissions() call into the permissions module 2017-08-16 11:21:06 -07:00
James Lu
f439267129 Allow limiting login blocks to opers & certain hosts
Closes #502.
2017-08-07 21:44:15 -07:00
James Lu
14bebd98e7 control: fix import loop with pylinkirc.classes 2017-08-07 17:06:56 -07:00
James Lu
dd1444dcd9 corecommands: block 'identify' from being used by command proxies such as networks.remote
This would have pretty bad unintentional consequences...
2017-08-07 16:31:28 -07:00
James Lu
8059f3f7fc Allow specifying login blocks that are local to certain networks 2017-08-07 16:16:17 -07:00
James Lu
21a39de0b4 corecommands: alias 'identify' to 'login' and 'id' 2017-08-07 16:15:54 -07:00
James Lu
2ff0007e56 exttargets: add $realname target 2017-08-06 21:41:44 -07:00
James Lu
4379ef68ef Migrate coremods.permissions to snake case 2017-08-02 22:24:23 +08:00
James Lu
f15f27168a services_support: log the reason as well when a service bot is killed 2017-08-02 22:15:19 +08:00
James Lu
3eb2c6bbf7 service_support: raise KILLs to service bots to INFO 2017-07-30 00:32:59 +08:00
James Lu
91659ea992 core: Properly track whether we should actually remove the PID file
Previously, PyLink spuriously removed PID files even if -n/--no-check-pid was set or if PID file checking caused PyLink to quit
2017-07-20 21:13:01 +08:00
James Lu
5a5a98c4ef services_support: migrate to conf.conf['pylink'], make the realname option optional 2017-07-14 05:51:40 -07:00