mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-10 22:19:31 +01:00
JOIN: Disable JOIN 0 support, in line with Insp
This commit is contained in:
parent
4128ff6137
commit
34863a6320
@ -193,10 +193,8 @@ Returns whether the given nicks exist on the network.`,
|
||||
},
|
||||
"join": {
|
||||
text: `JOIN <channel>{,<channel>} [<key>{,<key>}]
|
||||
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 <channel> <user> [reason]
|
||||
|
@ -905,13 +905,10 @@ func renameHandler(server *Server, client *Client, msg ircmsg.IrcMessage) bool {
|
||||
}
|
||||
|
||||
// JOIN <channel>{,<channel>} [<key>{,<key>}]
|
||||
// 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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user