fix: block PASS/USER/NICK from clients post-registration
All three registration commands are now explicitly intercepted after the client has authenticated. NICK gets a notice pointing to the bouncer command; PASS and USER are silently dropped. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -112,13 +112,14 @@ class Client:
|
|||||||
if msg.command == "QUIT":
|
if msg.command == "QUIT":
|
||||||
return
|
return
|
||||||
|
|
||||||
# Block direct NICK -- must go through /msg *bouncer NICK <network> <nick>
|
# Block registration commands -- never forward to networks
|
||||||
if msg.command == "NICK":
|
if msg.command in ("NICK", "PASS", "USER"):
|
||||||
self._send_msg(IRCMessage(
|
if msg.command == "NICK":
|
||||||
command="NOTICE",
|
self._send_msg(IRCMessage(
|
||||||
params=[self._nick, "Use /msg *bouncer NICK <network> <nick>"],
|
command="NOTICE",
|
||||||
prefix="*bouncer!bouncer@bouncer",
|
params=[self._nick, "Use /msg *bouncer NICK <network> <nick>"],
|
||||||
))
|
prefix="*bouncer!bouncer@bouncer",
|
||||||
|
))
|
||||||
return
|
return
|
||||||
|
|
||||||
# Intercept bouncer control commands
|
# Intercept bouncer control commands
|
||||||
|
|||||||
Reference in New Issue
Block a user