From 34863a6320c871cc504bdbbe057d632f68d0d5d1 Mon Sep 17 00:00:00 2001 From: Daniel Oaks Date: Sat, 10 Jun 2017 17:03:23 -0600 Subject: [PATCH] JOIN: Disable JOIN 0 support, in line with Insp --- irc/help.go | 4 +--- irc/server.go | 7 ++----- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/irc/help.go b/irc/help.go index 6f682c26..ef793c8a 100644 --- a/irc/help.go +++ b/irc/help.go @@ -193,10 +193,8 @@ Returns whether the given nicks exist on the network.`, }, "join": { text: `JOIN {,} [{,}] -JOIN 0 -Joins the given channels with the matching keys, or if the only param is "0" -parts all channels instead.`, +Joins the given channels with the matching keys.`, }, "kick": { text: `KICK [reason] diff --git a/irc/server.go b/irc/server.go index d82a72d6..87709353 100644 --- a/irc/server.go +++ b/irc/server.go @@ -905,13 +905,10 @@ func renameHandler(server *Server, client *Client, msg ircmsg.IrcMessage) bool { } // JOIN {,} [{,}] -// JOIN 0 func joinHandler(server *Server, client *Client, msg ircmsg.IrcMessage) bool { - // handle JOIN 0 + // kill JOIN 0 requests if msg.Params[0] == "0" { - for channel := range client.channels { - channel.Part(client, client.nickCasefolded) - } + client.Notice("JOIN 0 is not allowed") return false }