aboutsummaryrefslogtreecommitdiff
path: root/command.c
diff options
context:
space:
mode:
Diffstat (limited to 'command.c')
-rw-r--r--command.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/command.c b/command.c
index 04e9fe0..51acfb6 100644
--- a/command.c
+++ b/command.c
@@ -50,9 +50,7 @@ static struct cmd_retval cmd_login(struct conn_data *data,const char *tag,const
data->userid=-1;
}
} else {
- char *pass=db_get_pass(userid);
- bool success=strcmp(args[1],pass)==0;
- free(pass);
+ bool success = db_check_pass(userid, args[1]);
if(data->userid!=-1){
userdata_unregister(data->userid,data->fd);
broadcast_online_change(data->userid);