3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-12-29 14:12:39 +01:00
Commit Graph

3178 Commits

Author SHA1 Message Date
James Lu
2df3dc280c commands.showuser: show home server and TS as "N/A" if they are spoofed values 2018-05-26 01:14:32 -07:00
James Lu
b72420a8aa Revert "NetworkCore: return the server in get_server if the arg was a server"
The complete implementation of is_privileged_service() in ec3a94c4ca explicitly checks the entity ID type, so this strange hack is not needed.

This reverts commit 9113b34b46.
2018-05-26 01:14:32 -07:00
James Lu
ec3a94c4ca Move U:line checking into core as PyLinkNCWUtils.is_privileged_server()
Closes #604.
2018-05-26 00:14:04 -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
73261a31bd opercmds: forbid killing the main PyLink client 2018-05-21 02:37:53 -07:00
James Lu
b9f782868c inspircd: remove users from the state immediately when sending a kill
This matches Anope and Atheme's behaviours.

Closes #607.
2018-05-21 00:33:13 -07:00
James Lu
a66a9b6336 core: demote KeyError logging in _remove_client to DEBUG
This is needed for #607.
2018-05-21 00:28:16 -07:00
James Lu
c9c937e7a7 relay: block networks not on the claim list from merging in modes when relinking
This can cause channels to be inadvertently set modes that it shouldn't be on a relink (e.g. modes set by services DEFCON), since relay ignores modes from defined u-lines instead of bouncing them.
2018-05-21 00:09:57 -07:00
James Lu
1fb2a90580 relay: log rejected links due to LINKACL to WARNING
Closes #609.
2018-05-20 22:17:23 -07:00
James Lu
20bbf531e6 wrap_message: fall back to bufsize=510 on protocols declaring S2S_BUFSIZE to be 0 (unlimited) 2018-05-18 19:09:06 -07:00
James Lu
559b262db8 core: break attempts to read from a socket if no data is available 2018-05-18 19:08:37 -07:00
James Lu
f87e646f35 core: use the most recent UID if we have an unresolved nick collision / desync
This is the one most likely to be correct, assuming IRCds deals with nick collisions properly on their own.
2018-05-18 18:17:04 -07:00
James Lu
73322bd9ba wrap_message: expand UID targets into nicks before processing (#153) 2018-05-11 14:47:27 -07:00
James Lu
244c4fe0eb classes: return valid channels as-is in get_friendly_name()
This makes it safe to use when processing message targets. (ref #153)
2018-05-11 14:47:18 -07:00
James Lu
0ac5d424d8 core: implement text wrapping in irc.msg()
Closes #153.
2018-05-11 14:38:21 -07:00
James Lu
5d098f57d7 example-conf: relay::tag_nicks = false is no longer experimental
We've been using this in production with 2.0 for quite some time.

[skip ci]
2018-05-11 14:01:27 -07:00
James Lu
13c315c9a2 example-conf: fix a typo (enable_default_claim -> relay_enable_default_claim) 2018-05-11 13:28:57 -07:00
James Lu
28862281fe example-conf: rework some relay config descriptions for consistent style 2018-05-11 13:26:37 -07:00
James Lu
741e2c8ece relay: allow claim to be disabled by default on new channels
Closes #581.
2018-05-11 13:26:13 -07:00
James Lu
fc275cfdca relay: remove service bots joined persistently when the home network disconnects 2018-05-11 13:21:16 -07:00
James Lu
aa4cedd945 relay: allow default LINKACL mode to be configured as an option (#394) 2018-05-11 13:09:54 -07:00
James Lu
fb6aa88d83 Merge branch 'relay-linkacl-whitelist' into devel
Closes #394.
2018-05-11 12:58:45 -07:00
James Lu
77a6d69f29 RELNOTES: more changelog clarifications and fixes for 2.0-alpha3
[skip ci]
2018-05-10 17:42:53 -07:00
James Lu
16f630560e PyLink 2.0-alpha3 2018-05-10 17:34:52 -07:00
James Lu
613e6412a2 networks.remote: properly error if the target service is not available on the target network
Closes #554.
2018-05-10 16:06:16 -07:00
James Lu
30c1980b59 relay: consistently use bold instead of repr in LINKACL output 2018-05-09 23:33:00 -07:00
James Lu
0ae4aea133 relay: add a whitelist mode for LINKACL (#394) 2018-05-09 23:29:56 -07:00
James Lu
f1b3d8d0ad README: typo fix
[skip ci]
2018-05-09 22:47:16 -07:00
James Lu
d1ac33a1af utils: remove references to deprecated irc.proto 2018-05-09 22:44:36 -07:00
James Lu
64a98120bf relay: remove references to deprecated irc.proto 2018-05-09 22:44:17 -07:00
James Lu
3120fa5396 clientbot: stop sending duplicate JOIN hooks
Also set _clientbot_initial_who_received on 315/ENDOFWHO, instead of on the first /who response we get.

Really fixes #551.
2018-05-09 22:31:19 -07:00
James Lu
451db74f0c clientbot: don't send duplicate away statuses 2018-05-09 22:23:14 -07:00
James Lu
f54382534c kick and kill should raise NotImplementedError when not supported by a protocol
Closes #605.
2018-05-09 22:19:03 -07:00
James Lu
b50ae89acc relay: check service bot status before remote user presence
add_persistent_channels() is usable regardless of whether the service bot is ready, so we do not need to break if the remote copy of the service bot doesn't exist.

Closes #606.
2018-05-09 21:44:04 -07:00
James Lu
f3c2149d7a relay: fix variable confusion when managing service bots
We should be checking for service bot presence locally, and applying changes on the *remote* network.
2018-05-09 21:34:17 -07:00
James Lu
0c19b3719e automode: clarify comments to main() slightly 2018-05-09 21:29:20 -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
d46c494351 faq: move service bot issues under a separate heading
[skip ci]

(cherry picked from commit eb078056e1)
2018-05-08 13:37:22 -07:00
James Lu
b5133aebbb faq: more minor edits
[skip ci]

(cherry picked from commit 030facdb75)
2018-05-08 13:37:22 -07:00
James Lu
940ff357c9 faq: add links to YAML guides, complete with a mini-rant on YAML misconceptions
[skip ci]

(cherry picked from commit 074019b77a)
2018-05-08 13:37:22 -07:00
James Lu
a425015c13 faq: link to the new Disabling Colors/Control Codes section in adv-relay-config
(cherry picked from commit 0ce80f0ede)
2018-05-08 13:37:22 -07:00
James Lu
19c9d4031d Add a donate badge
[skip ci]

(cherry picked from commit d0568a6ad7)
2018-05-08 13:37:22 -07:00
James Lu
83dd37c4e7 Drop pypandoc stuff and use Markdown descriptions on PyPI
(cherry picked from commit 8a09f321da)
2018-05-08 13:37:22 -07:00
James Lu
f06a8f09b4 docs/adv-relay-config: resync with master
Remaining changes: restore documentation for
  - $mode_prefix in Custom Clientbot Styles
  - The relay_endburst_delay option on InspIRCd networks

[skip ci]
2018-05-08 13:36:20 -07:00
James Lu
09d2f99855 RELNOTES: refresh with more 2.0-alpha3 changes
[skip ci]
2018-05-06 11:39:48 -07:00
James Lu
2f6c8d2938 Revert "relay: shortcut get_remote_user some more; only grab spawn lock if the user doesn't exist"
This seems to have caused sporadic duplicate user spawns once more (#602)

This reverts commit 0bc24c94b2.
2018-05-05 23:17:24 -07:00
James Lu
c71e9a6410 Merge branch 'services-v3' into devel
- Revamp persistent channel registration to be plugin specific, effectively working around relay-services conflicts (closes #265)
- New abstraction in ServiceBot: add/remove_persistent_channel() to manage persistent channels independently of explicit joins and parts
- Introduce ServiceBot.part(), which sends a part "request" that succeeds only if a channel is not marked persistent by any plugin
- Replace ServiceBot.join() calls with the new registration mechanism, which queues joins instead of dropping them if the service client is not yet ready (closes #596)
2018-05-05 23:17:10 -07:00
James Lu
5a0cb9a4ff automode: add/remove persistent channels on set/del/clearacc 2018-05-05 21:51:27 -07:00
James Lu
8aa67b93fa automode: also rejoin DB channels on reload 2018-05-05 21:10:08 -07:00
James Lu
bf4863eb6d relay, ServiceBot: remove dead code 2018-05-05 13:20:55 -07:00