Trim possible :-prefix sent by Pidgin in PASS command

This commit is contained in:
Sergey Matveev 2016-04-07 18:33:27 +03:00 committed by User Mue
parent 1dbc0856bd
commit 2d71da2234
1 changed files with 2 additions and 1 deletions

View File

@ -167,7 +167,8 @@ func ClientRegister(client *Client, cmd string, cols []string) {
client.ReplyNotEnoughParameters("PASS")
return
}
client.password = &cols[1]
password := strings.TrimPrefix(cols[1], ":")
client.password = &password
case "NICK":
if len(cols) == 1 || len(cols[1]) < 1 {
client.ReplyParts("431", "No nickname given")