James Lu
ed4404bf4b
relay: fake revert mode changes we couldn't bounce ( #23 )
...
This allows services to revert mode changes CLAIM was not happy with, instead of causing another mode war during this process.
2019-06-21 15:38:49 -07:00
James Lu
dcab011673
relay: pretend mode reverts on SJOIN always succeed ( #23 )
...
This prevents remote services from bypassing CLAIM, since the end result of a mode war is that they remained opped.
2019-06-21 15:28:52 -07:00
James Lu
94cd1d8f22
relay: implement kick/mode/topic war prevention ( #23 )
...
This adds cachetools as a dependency for Relay.
2019-06-21 14:57:43 -07:00
James Lu
042d11d7ba
relay: remove extraneous variable
2019-06-21 14:03:21 -07:00
James Lu
0836845ff9
Merge relay showchan/showuser info into commands.py
...
This makes error handling easier and is needed to support duplicate nicks anyways.
2019-06-16 11:22:36 -07:00
James Lu
3d039b78e2
relay: use [] as altchars for Base64 fallback
...
This ensures that mangled nicks can be reversed more easily (by removing leading _'s and replacing - with =)
2019-06-15 23:48:46 -07:00
James Lu
41cbd455d6
relay: only check _invisible flag on actual users
2019-04-02 21:22:40 -07:00
James Lu
71353a29c2
relay: add support for hiding users marked invisible or offline
...
First part of https://github.com/PyLink/pylink-discord/issues/19
2019-03-28 20:14:58 -07:00
James Lu
63d63c0137
relay: allow trailing .'s in subserver names
2019-03-20 21:14:12 -07:00
James Lu
88f45fb1d5
relay: whitelist ~ in idents
2019-03-20 21:08:55 -07:00
James Lu
c9176a06fc
relay: check for nicks starting with numbers or - after removing Unicode
2019-03-20 21:08:21 -07:00
James Lu
9d459fab92
relay: fixes to support IDs as channel name
...
- Don't enforce local channel validity rules on the remote channel name
- Normalize channels to str before looking them up in the DB
2019-02-16 16:35:47 -08:00
James Lu
96815a0a32
relay: sanitize idents before mirroring them to IRC
2019-02-12 15:55:14 -08:00
James Lu
a9f59307c9
relay: use base64 as fallback if unidecode returns an empty string for nick
...
This is the case for e.g. nicks that are only an emoji.
2019-02-12 14:17:53 -08:00
James Lu
11b65ee809
relay: rework nick normalization with optional unidecode support
...
This will attempt to translate UTF-8 nicks to ASCII ones instead of doing the ugly '||||' replace.
Also, the fallback character for disallowed nick characters is now "-" instead of "|".
TODO: document relay::use_unidecode
Closes #561 .
2019-02-12 00:58:20 -08:00
James Lu
61c8677802
classes, relay_clientbot: more type safety for protocols/discord
2019-02-07 13:50:32 -08:00
James Lu
852c257e88
relay: remove use of re-entrant locks
...
This shouldn't be necessary anymore.
2018-12-27 11:58:39 -08:00
James Lu
bf9eb8d4ea
relay: fix incorrect in-place changes of modedelta modes
...
This caused the database to be filled with extraneous "-modename" entries when removing modes from the previous modedelta.
2018-11-30 10:21:51 -08:00
James Lu
dac8410b63
relay: shortcut if the remote network is not ready
2018-10-10 22:49:10 -07:00
James Lu
0b3793380b
relay: remove TCONDITION_TIMEOUT
2018-10-08 14:59:01 -07:00
James Lu
1ee93d2cc4
relay: remove world.started check, this shouldn't be needed anymore
2018-10-08 14:44:37 -07:00
James Lu
767ff15200
relay: add an explicit forcetag command
...
We used to be able to just /kill to forcetag, but with PyLink 2.0 kills actually get relayed.
2018-10-08 12:42:38 -07:00
James Lu
57faa1443a
relay: rename nick_collide() to forcetag_nick()
2018-10-08 12:41:52 -07:00
James Lu
20b3a61cd6
relay: simplify is_relay_client()
2018-10-08 12:12:09 -07:00
James Lu
a3e18081a6
relay: don't relay as text modes being set on netburst ( #627 )
2018-09-21 21:53:34 -07:00
James Lu
12f6bb5e18
relay: don't relay kill->kick when remotechan is None
2018-07-18 18:45:49 -07:00
James Lu
f9611ef6bc
relay: grant CHANDESC permissions to opers if allow_free_oper_links is true
2018-07-11 21:56:29 -07:00
James Lu
71a24b8b9f
relay: remove noctcp, regdeaf, stripcolor from whitelisted umodes
...
Filter-type umodes don't work properly with relay yet.
2018-07-10 18:09:24 -07:00
James Lu
c1f37c2236
relay: don't allow servers to forward KILLs
...
Closes #621 .
2018-07-08 12:49:30 -07:00
James Lu
086a5f4496
example-conf, relay, utils: replace 2.0-alpha4 references with 2.0-beta1
2018-06-26 14:44:07 -07:00
James Lu
c3bb0f7aca
relay: rework kill->kick forwarding to send from the sender network's subservers
...
This makes the kick message a lot neater.
Before:
* net1.relay has kicked GL/net1 from #test ((net2.relay) KILL FWD from GL/net2: test)
After:
* net2.relay has kicked GL/net1 from #test (KILL FWD from GL/net2: test)
2018-06-14 14:48:54 -07:00
James Lu
76b58c4432
relay: log chandesc changes to INFO
2018-06-12 02:36:37 -07:00
James Lu
77fd9475b6
relay: show channel descriptions before "created by" info
2018-06-12 02:33:29 -07:00
James Lu
8c42825612
relay: allow disabling free link access for all opers
2018-06-12 00:26:24 -07:00
James Lu
1b68bfadc6
coremods, plugins, protocols: drop now redundant allowAuthed=False in is_oper() calls
2018-06-11 23:56:44 -07:00
James Lu
2e3317ce07
relay: explicitly mention forwarding in relayed kill messages ( #520 )
2018-06-11 19:26:52 -07:00
James Lu
93fef9b923
relay: use match_text() to check forcetag_nicks globs
2018-06-11 18:51:30 -07:00
James Lu
73d0e153cf
relay: support relaying kills ( #520 )
...
Instead of always bouncing, kills to a relay client are now handled as follows:
1) If the target and source networks are both in any killshare pool, relay the kill entirely
2) Otherwise, iterate over all channels the kill target is in:
3) If the killer has claim access in a channel, forward the KILL as a kick
4) Otherwise, bounce the kill (so far, silently)
TODO: kill messages are currently very cluttered, we should make our parser deliver more concise strings...
* GL|unreal has quit (Killed (chary.relay (KILL from GL/chary: Killed (GL (test)))))
2018-06-11 18:34:52 -07:00
James Lu
9466813ba1
relay: switch to a flexible, pool-based configuration scheme for IP sharing
...
This deprecates the "relay::show_ips" and network-specific "relay_no_ips" options, replacing it with the "relay::ip_share_pools" list.
2018-06-11 17:29:29 -07:00
James Lu
b1248524a9
relay: raise an error when trying to delink a leaf channel from another leaf network
...
Previously this would (confusingly) delink the channel from the network the command was called on instead of the intended target.
2018-06-08 18:45:45 -07:00
James Lu
8cc838e5ca
relay: allow "relay.link.force_ts" as an alternate permission to 'link --force'
2018-06-08 15:56:42 -07:00
James Lu
06d57a5b28
relay: rename 'link --force' to 'link --force-ts' to better reflect its purpose
...
Also mention explicitly that this option does not bypass LINKACL and other channel restrictions (e.g. the Clientbot one)
2018-06-07 13:48:38 -07:00
James Lu
d4bf407c5d
relay: oops, the op check in 'link' should be specific to clientbot
2018-06-07 13:44:37 -07:00
James Lu
b202954be4
relay: check permissions before clientbot op status to prevent arbitrary join triggering
...
This mirrors the fix in 1.x: commit 141e941fcd
2018-06-07 13:39:16 -07:00
James Lu
fee64ece04
relay: fix clientbot op requirement not being checked if the sender is in the target channel
...
Also, show a slightly different error when using the command with 'remote', since the clientbot client gets overridden to be the message sender.
This mirrors the fix in 1.x: commit 9578fd5ac3
2018-06-07 13:38:52 -07:00
James Lu
62fcdf880c
relay: support setting freeform channel descriptions for LINKED
...
Closes #576 .
2018-06-01 23:03:31 -07:00
James Lu
32acc27967
relay: tweak the "wrong network" error message for claim, modedelta
2018-06-01 22:48:13 -07:00
James Lu
c8b2a676fd
relay: rename CHANNEL_DELINKED_PARTMSG -> CHANNEL_DELINKED_MSG
2018-05-30 12:45:20 -07:00
James Lu
08a7b5c837
relay: remove our persistent channels on unload
2018-05-30 12:43:59 -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