3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-12-02 00:49:25 +01:00

Make it act as intended

This commit is contained in:
Daniel Oaks 2019-02-13 23:42:03 +10:00
parent 53ed368701
commit 78a0b322f7

View File

@ -2312,11 +2312,6 @@ func sceneHandler(server *Server, client *Client, msg ircmsg.IrcMessage, rb *Res
// SETNAME <realname> // SETNAME <realname>
func setnameHandler(server *Server, client *Client, msg ircmsg.IrcMessage, rb *ResponseBuffer) bool { func setnameHandler(server *Server, client *Client, msg ircmsg.IrcMessage, rb *ResponseBuffer) bool {
if !client.capabilities.Has(caps.SetName) {
client.Send(nil, server.name, "FAIL", "SETNAME", "CAP_NOT_NEGOTIATED", fmt.Sprintf("Capability '%s' is not negotiated, and is required to use this command", caps.SetName.Name()))
return false
}
realname := msg.Params[0] realname := msg.Params[0]
client.stateMutex.Lock() client.stateMutex.Lock()