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

51 Commits

Author SHA1 Message Date
James Lu
a30921eeb8 classes: remove irc.conf (#422) 2018-06-11 23:44:59 -07:00
James Lu
3bea214cb0 classes: remove irc.botdata (#422) 2018-06-11 23:43:57 -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
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
82a7b914b6 Move control.tried_shutdown to world.shutting_down 2017-08-31 13:36:50 -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
14bebd98e7 control: fix import loop with pylinkirc.classes 2017-08-07 17:06:56 -07:00
James Lu
4379ef68ef Migrate coremods.permissions to snake case 2017-08-02 22:24:23 +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
2e7fed84c1 IRCNetwork: mark connection_thread, pingTimer, socket, and queue as private 2017-07-12 22:56:30 -07:00
James Lu
d57e141fbc control: log the name of the PID file on shutdown 2017-07-12 22:22:08 -07:00
James Lu
bb2b57f9dd control: mark signal handlers as private 2017-07-12 22:22:08 -07:00
James Lu
74f68c2176 control: mark rehash and shutdown as public 2017-07-12 22:22:08 -07:00
James Lu
22e6992770 core: consistently call die() with irc as a keyword argument 2017-07-12 22:22:08 -07:00
James Lu
9a2bff25ee control: migrate to new log_setup() name 2017-07-12 07:50:34 -07:00
James Lu
883f9199ec control: move rehash signal to SIGUSR1, and shutdown on SIGHUP (terminal close)
PyLink technically isn't a daemon, so it's a bit odd to have it linger around after the controlling terminal has died.
2017-07-02 21:19:04 -07:00
James Lu
ea455436c1 control: fix REHASH for 2.x protocol modules 2017-06-30 00:41:29 -07:00
James Lu
f80c5df971 control: log the start and end of rehash to INFO 2017-06-02 08:46:27 -07:00
James Lu
60a0bcdc7a Rename config option log:stdout -> log:console
Closes #386.
2017-06-02 08:42:32 -07:00
James Lu
6e8f618f80 control: don't duplicate config validation 2017-06-02 08:34:59 -07:00
James Lu
998beb51b5 control: move plugin shutdown & pidfile cleanup routines to atexit
It is possible for PyLink to shutdown indirectly by disconnecting all networks. In these cases, the shutdown routines never ran at all...
2017-05-12 19:13:02 -07:00
James Lu
59dd8d3bf8 control: print remaining threads on forced shutdowns as well 2017-05-07 13:39:46 -07:00
James Lu
55873416a1 control: raise KeyboardInterrupt to speed up forced shutdowns? 2017-03-26 14:44:04 -07:00
James Lu
c67c0aa2e6 rehash: fix resetting the wrong autoconnect multiplier variable 2017-03-11 01:05:07 -08:00
James Lu
2028cab04c core: Grow autoconnect delays by a configurable factor whenever connections fail
Closes #348.
2017-03-11 00:21:30 -08:00
James Lu
0526e96dc5 control: remove an extraneous, obsolete comment 2017-03-10 23:57:37 -08:00
James Lu
f6d9765f87 core: implement module loading from user-defined directories
Closes #350.
2017-03-08 22:31:57 -08:00
James Lu
8a773dea4e core: normalize exit codes 2017-02-27 07:26:29 -08:00
James Lu
a3f122fee4 control: try a more stable force-shutdown routine 2017-02-18 12:19:53 -08:00
James Lu
b2286157ef core: update stdout log level on REHASH 2017-01-07 00:12:35 -08:00
James Lu
e7a005b685 control: log remaining threads on shutdown, for debugging freezes 2016-12-16 19:42:12 -08:00
James Lu
b3387f2d41 conf: fix deprecation warnings crashing because log is unavailable
This allows conf methods to access to global logger by via an optional 'logger' argument. However,
the caveat is that the logging facilities are still unavailable on first start, because log can
only be imported *after* the configuration is loaded.
2016-12-05 22:43:01 -08:00
James Lu
b750bd4d15 coremods/control: ignore errors when removing PID file 2016-10-15 14:31:13 -07:00
Ken Spencer
bc4be815e4 coremods: make _shutdown remove running 'config'.pid 2016-10-15 16:50:25 -04:00
James Lu
556b388a4e core: Rehashable permissions; import coremods on start 2016-08-25 12:07:55 -07:00
James Lu
126a07bdf6 core: rehashable file loggers with log rotation support
Closes #176. Closes #315.
2016-08-17 21:42:18 -07:00
James Lu
0d563eaa57 control/utils: unload the PyLink service bot on shutdown 2016-07-26 16:26:01 -07:00
James Lu
a4dbd8d09f control: handle SIGINT for clean shutdown on ctrl-c
Closes #280.
2016-07-26 16:16:23 -07:00
James Lu
8704114fa0 control: copy world.networkobjects to prevent RuntimeError
i.e.: RuntimeError: dictionary changed size during iteration
2016-07-01 22:20:24 -07:00
James Lu
017d6a4651 coremods: remove references to 'coreplugin' in logging 2016-07-01 21:08:50 -07:00
James Lu
4bd621f47e control: when rehashing, reconnect networks without autoconnect that failed to connect the first time 2016-07-01 20:33:00 -07:00
James Lu
847a98755f core: use a shared function for disconnecting + removing networks 2016-07-01 20:14:31 -07:00