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
5b94a10c67
example-conf: rewrap antispam section, typo fix
...
[skip ci]
2018-06-02 00:57:26 -07:00
James Lu
b120e2d701
antispam: allow individual punishments to fail gracefully when not supported
2018-06-02 00:31:14 -07:00
James Lu
186b73c72d
example-conf: more wording tweaks
2018-06-02 00:15:26 -07:00
James Lu
df6562dcff
example-conf: add antispam to the available plugins list
2018-06-02 00:09:52 -07:00
James Lu
cb774ac3da
example-conf: document antispam::exempt_level
2018-06-02 00:07:20 -07:00
James Lu
e65d84960a
antispam: make punishments method-specific
2018-06-02 00:06:21 -07:00
James Lu
8cc4527ff7
example-conf: initial documentation for the antispam plugin
2018-06-01 23:50:50 -07:00
James Lu
83aa3d262c
antispam: allow masshighlight blocking to be disabled
2018-06-01 23:48:22 -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
5ac283f018
ServiceBot: introduce clear_persistent_channels() to clear all persistent channels in a namespace
2018-05-30 12:43:51 -07:00
James Lu
1ab5d614c0
protocols: convert user TS to an int when receiving new users ( #594 )
2018-05-26 16:26:14 -07:00
James Lu
e3a935d0b7
classes: make User, Channel TS a property for type-safety ( #594 )
2018-05-26 02:30:25 -07:00
James Lu
f20fa5e995
Add User.get_fields(), and rework plugins to fix $nick broken expansions
...
User.nick is no longer a writable attribute since a085aed924
, so it won't show up in __dict__ now.
get_fields() replaces the User.__dict__ hack various plugins used and also provides some new expansion variables:
- $sid and $server expand to the server ID and name respectively
- $modes and $channels are now preformatted strings
- $netname expands to the network name
$manipulatable and $_irc were removed since their values aren't quite meaningful as strings
2018-05-26 02:12:38 -07:00
James Lu
108d4b86d9
login: fix login for legacy accounts ( #590 )
2018-05-26 01:27:12 -07:00
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