3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-29 07:29:31 +01:00

JOIN: Disable JOIN 0 support, in line with Insp

This commit is contained in:
Daniel Oaks 2017-06-10 17:03:23 -06:00
parent 4128ff6137
commit 34863a6320
2 changed files with 3 additions and 8 deletions

View File

@ -193,10 +193,8 @@ Returns whether the given nicks exist on the network.`,
}, },
"join": { "join": {
text: `JOIN <channel>{,<channel>} [<key>{,<key>}] text: `JOIN <channel>{,<channel>} [<key>{,<key>}]
JOIN 0
Joins the given channels with the matching keys, or if the only param is "0" Joins the given channels with the matching keys.`,
parts all channels instead.`,
}, },
"kick": { "kick": {
text: `KICK <channel> <user> [reason] text: `KICK <channel> <user> [reason]

View File

@ -905,13 +905,10 @@ func renameHandler(server *Server, client *Client, msg ircmsg.IrcMessage) bool {
} }
// JOIN <channel>{,<channel>} [<key>{,<key>}] // JOIN <channel>{,<channel>} [<key>{,<key>}]
// JOIN 0
func joinHandler(server *Server, client *Client, msg ircmsg.IrcMessage) bool { func joinHandler(server *Server, client *Client, msg ircmsg.IrcMessage) bool {
// handle JOIN 0 // kill JOIN 0 requests
if msg.Params[0] == "0" { if msg.Params[0] == "0" {
for channel := range client.channels { client.Notice("JOIN 0 is not allowed")
channel.Part(client, client.nickCasefolded)
}
return false return false
} }