mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-25 13:29:27 +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": {
|
"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]
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user