move password handling into a single file

This commit is contained in:
Jeremy Latt 2014-03-01 15:10:04 -08:00
parent b421971b61
commit 9aa7debbfe
4 changed files with 45 additions and 20 deletions

View file

@ -1,7 +1,6 @@
package irc
import (
"code.google.com/p/go.crypto/bcrypt"
"code.google.com/p/go.text/unicode/norm"
"errors"
"fmt"
@ -214,7 +213,7 @@ func (cmd *PassCommand) CheckPassword() {
if cmd.hash == nil {
return
}
cmd.err = bcrypt.CompareHashAndPassword(cmd.hash, cmd.password)
cmd.err = ComparePassword(cmd.hash, cmd.password)
}
func NewPassCommand(args []string) (editableCommand, error) {