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

189 Commits

Author SHA1 Message Date
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
fb626c8a97 services_support: remove workarounds for the PyLink service nick & ident being in conf::bot (#343) 2017-03-10 23:47:07 -08:00
James Lu
b23a887edd login: remove all__vary_rounds setting (deprecated in Passlib 1.7) 2017-03-08 22:58:17 -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
e8bf1d08bc handlers, fantasy: migrate away from irc.botdata (#273) 2017-03-05 00:10:33 -08:00
James Lu
8a773dea4e core: normalize exit codes 2017-02-27 07:26:29 -08:00
James Lu
ae56ed6a32 services_support: fix service-specific key name 2017-02-26 18:11:20 -08:00
Ken Spencer
b3ec8a6790 service_support: allow server:service_channels for per service autojoin 2017-02-26 21:05:33 -05:00
James Lu
fe3fa2872d corecommands: remove extraneous irc.checkAuthenticated() call 2017-02-24 17:49:54 -08:00
James Lu
a9d2a2c4bc relay, handlers: rewrite oper WHOIS replies to show the target's home network 2017-02-18 13:51:45 -08:00
James Lu
a3f122fee4 control: try a more stable force-shutdown routine 2017-02-18 12:19:53 -08:00
James Lu
d6a6d069bc Move 'mkpasswd' to the commands plugin 2017-01-22 16:42:46 -08:00
James Lu
fd12a5d919 core: make passlib an optional dependency 2017-01-22 16:42:46 -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
7b5fcc3219 corecommands: use irc.error() in login fail wrapper 2016-12-16 19:06:33 -08:00
James Lu
5a066bfde4 corecommands: port to use the permissions API (#367) 2016-12-09 21:43:58 -08:00
James Lu
57aa844fcb permissions: limit "login = admin access" to old-style (< 1.1) login blocks 2016-12-09 20:57:01 -08:00
James Lu
e7e2f2c98e core: update "missing dependencies" errors
Closes #363.
2016-12-09 17:15:53 -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
ffc271a53a login: Use a slightly faster CryptContext 2016-11-19 17:47:55 -08:00
James Lu
b1e4b34b79 Switch 'identify' to use the new login backend, add passlib to README dependencies
This new backend supports optional encryption (sha256_crypt / sha512_crypt via passlib). Closes #322.
2016-11-19 17:21:45 -08:00
James Lu
69066029f1 Simplify/rewrite the login module 2016-11-19 17:01:05 -08:00
James Lu
3308db0cd2 Import coremods/login.py (abstracted login checking) from @IotaSpencer's repo 2016-11-19 17:01:00 -08:00
James Lu
377df413ed Irc: s/isServiceBot/getServiceBot/g (#355)
This function is renamed to better reflect its return value (ServiceBot object instead of boolean True).
2016-11-09 19:09:59 -08:00
James Lu
08fa64c3cc Irc, services_support: store service name in IrcUser objects (#355) 2016-11-09 19:07:01 -08:00
James Lu
93ca62aa49 Revamp configuration to support multiple accounts (#319) 2016-11-07 21:01:28 -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
438838f81d ServiceBot: handle autojoin additions even if bots haven't spawned yet 2016-09-24 12:33:57 -07:00
James Lu
1c60ad7251 services_support: honour joinmodes settings on kick-rejoin 2016-09-24 12:22:12 -07:00
James Lu
a040c3c7d2 ServiceBot: modularize join() for explicit channel joining (#326) 2016-09-23 23:43:07 -07:00
James Lu
0cce6ca488 service_support: allow specifying modes to join with for each service (#326)
This updates the example config to, by default, join Automode bots as op in channels.
2016-09-23 23:10:38 -07:00
James Lu
a12ed6ad35 services_support: hack around nick clashes between service clients & real users in Clientbot
For #327. Essentially what this does is tack on a nick prefix to all service bots introduced on a Clientbot network, using characters invalid for regular nicks.
2016-09-06 20:04:19 -07:00
James Lu
d1e2dfcf61 clientbot: only call spawnClient for new message sources after irc.pseudoclient is set 2016-09-01 13:08:20 -07:00
James Lu
e903a8226a permissions: move admin login clause into checkPermissions()
This is more persistent.
2016-08-31 13:32:42 -07:00
James Lu
556b388a4e core: Rehashable permissions; import coremods on start 2016-08-25 12:07:55 -07:00
James Lu
6af8e77ee1 permissions: apply add/removeDefaultPermissions on the right list 2016-08-25 12:07:36 -07:00
James Lu
f890ddac1b permissions, automode: work on default permissions & add example permissions config (#190)
- Fix possible type errors in add/removeDefaultPermissions by converting permlist values to sets.
- Fix wrong permission string being checked in automode.<command>.#channel
- automode: register and unregister default permissions on load/unload.
- permissions: add an 'also_show' argument to checkPermissions(), to display alternative permissions that weren't directly checked.
2016-08-25 11:45:57 -07:00
James Lu
b4b772354c permissions: fix inverted permissions list lookup 2016-08-25 00:58:19 -07:00
James Lu
91e39b7df9 WIP Permissions API (#190) 2016-08-25 00:45:05 -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
94aee8f05c Implement /TIME support (#228) 2016-08-12 19:19:09 -07:00
James Lu
a76bd8c5b2 core: make hostmask fetching a shared function 2016-08-12 19:18:56 -07:00
James Lu
e50684e367 Merge branch 'master' into devel 2016-08-04 10:29:17 -07:00
James Lu
a9fe0499e6 services_support: ignore invalid autojoin channels
Reported by @rvzm on IRC.

Closes #308.
2016-08-04 10:26:00 -07:00
James Lu
c9ce4d1507 Irc: make sorting in joinModes() an option, and explicitly enable it in WHOIS output
This prevents mode lists from being sorted when they really shouldn't be, such as when relaying mode changes ("+qo nick nick" became +oq nick nick").

(cherry picked from commit 4b27ebbee4)
2016-08-01 17:59:31 -07:00
James Lu
4b27ebbee4 Irc: make sorting in joinModes() an option, and explicitly enable it in WHOIS output
This prevents mode lists from being sorted when they really shouldn't be, such as when relaying mode changes ("+qo nick nick" became +oq nick nick").
2016-07-31 21:45:38 -07:00
James Lu
1ef89560e2 core: rename IrcUser.identified attribute to IrcUser.account 2016-07-29 20:16:05 -07:00
James Lu
f4922743fc core: SID and hostname options are now optional (#282)
Hostname defaults to a fallback hardcoded in world.fallback_hostname, while SID defaults to None (protocol modules have to deal with this themselves)
2016-07-28 22:23:59 -07:00
James Lu
8047186c58 plugins, coremods: remove usage of irc.conf (#273) 2016-07-27 17:02:04 -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
c8ec2d9600 handlers: remove obsolete comment about WHOIS 2016-07-24 13:48:03 -07:00
James Lu
e342889937 corecommands: really fix 'reload'
(cherry picked from commit 150bfe8c66)
2016-07-23 22:02:08 -07:00
James Lu
f51a882d23 exttargets: verify target is in channel before calling getPrefixModes 2016-07-17 10:49:42 -07:00
James Lu
b79f391be6 corecommands: fix no-identify-in-channel logic 2016-07-13 19:32:39 -07:00
James Lu
9256500a23 corecommands: replace irc.msg() with irc.reply()
Thanks to @Techman- for pointing this out.
2016-07-13 19:20:11 -07:00
James Lu
cf40a38c14 corecommands: actually assign reload() output to update the module 2016-07-11 16:53:32 -07:00
James Lu
2b60cbd59c handlers: fix wrong server name in WHOIS output (8e29e16 regression) 2016-07-11 16:14:05 -07:00
James Lu
6a1349847f handlers: handle WHOIS requests to unknown nicks instead of warning
"/whois pylink.server badnick" is allowed everywhere except InspIRCd.
2016-07-11 15:58:18 -07:00
James Lu
8e29e16144 handlers: always send WHOIS reply numerics from our server
This fixes "/whois pylink.server TARGET" syntax sending replies from bad sources, when the target is NOT a PyLink client.
2016-07-11 15:49:23 -07:00
James Lu
1cf560c465 handlers: only show the highest prefix mode for channels in WHOIS output
Closes #270.
2016-07-11 15:46:32 -07:00
James Lu
2c656341e2 handlers: Optionally disable extended WHOIS replies for users marked as a bot
Closes #271. This adds a new option, "whois_show_extensions_to_bots", to the bot: section of the config.
2016-07-11 15:01:34 -07:00
James Lu
8f78205406 handlers: remove idle and signon time in WHOIS output (#267)
We can't accurately track this for things like relay users without forwarding WHOIS replies like Janus does. I don't really like faking values either, so let's just remove this entirely
2016-07-10 22:06:02 -07:00
James Lu
5d251d511a corecommands: fix wrong plugin module name causing 'unload' to not work
Plugin modules are now named 'pylinkirc.plugins.abcd' instead of just 'abcd', since the import system is absolute now.
2016-07-10 21:41:08 -07:00
James Lu
7a7b590295 corecommands: quick fix for 'reload' not updating things
The real issue is the 'unload' doesn't seem to cleanly unload things anymore. (Even though that was a pretty bad hack in the first place)

That needs to be cleaned up in the next release.
2016-07-07 22:48:38 -07:00
James Lu
4999ecd11f Integrate services_support and automode
New hook: PYLINK_SERVICE_JOIN
2016-07-07 21:54:59 -07:00
James Lu
14b30b26c0 exttargets: $pylinkacc matcher
Closes #170.
2016-07-07 12:10:09 -07:00
James Lu
1cec67725a exttargets: add $channel matcher (#170) 2016-07-07 12:00:23 -07:00
James Lu
1a8976afb6 exttargets: add $server matcher (#170) 2016-07-07 11:26:11 -07:00
James Lu
7dda8ebe58 exttargets: add $ircop matcher (#170) 2016-07-07 11:18:06 -07:00
James Lu
724ab0a45e exttargets: match account names case insensitively 2016-07-07 11:18:06 -07:00
James Lu
3e28856944 exttargets: fix typo in comment 2016-07-07 00:41:31 -07:00
James Lu
c034877d04 exttargets: $account scenario 3 matching should require logged in status 2016-07-07 00:29:52 -07:00
James Lu
183a4cbd75 core: add extban support in matchHost, and $account matching (#170)
The following forms are supported in $account, with groups separated by a
literal colon. All account and network name matching is currently case sensitive:

$account -> Returns True (a match) if the target is registered.
$account:accountname -> Returns True if the target's account name matches the one given, and the target is connected to the local network..
$account:accountname:netname -> Returns True if both the target's account name and origin network name match the ones given.
$account:*:netname -> Matches all logged in users on the given network.
2016-07-07 00:26:52 -07:00
James Lu
bcc84b8618 core: remove references to plugins/protocols_folder (#259) 2016-07-02 23:58:21 -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
408ce701b1 service_support: support optionally setting servprotect on service bots
Closes #243.
2016-07-01 21:25:58 -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
James Lu
1637193a53 service_support: add description for main PyLink bot 2016-06-30 17:45:05 -07:00
James Lu
b90c69eead ServiceBot: actually, make extra_channels network specific 2016-06-25 14:21:13 -07:00
James Lu
ceed9346c0 ServiceBot: allow configuring extra channels that bots will join 2016-06-25 14:14:19 -07:00
James Lu
170de377ca coremods: Move ServiceBot kill/kick/message handling into the right module
This also fixes the kill handler erroneously calling a spawn_service() that was never imported.
2016-06-25 13:58:59 -07:00
James Lu
3a57e8d595 Split coreplugin.py into coremods/
Closes #240.
2016-06-21 11:25:47 -07:00