equal
deleted
inserted
replaced
29 db.connect("localhost"); |
29 db.connect("localhost"); |
30 |
30 |
31 thread::spawn(move || { |
31 thread::spawn(move || { |
32 while let Ok((request_id, task)) = io_rx.recv() { |
32 while let Ok((request_id, task)) = io_rx.recv() { |
33 let response = match task { |
33 let response = match task { |
|
34 IoTask::CheckRegistered { nick } => match db.is_registered(&nick) { |
|
35 Ok(is_registered) => IoResult::AccountRegistered(is_registered), |
|
36 Err(e) => { |
|
37 warn!("Unable to check account's existence: {}", e); |
|
38 IoResult::AccountRegistered(false) |
|
39 } |
|
40 }, |
|
41 |
34 IoTask::GetAccount { |
42 IoTask::GetAccount { |
35 nick, |
43 nick, |
36 protocol, |
44 protocol, |
37 password_hash, |
45 password_hash, |
38 client_salt, |
46 client_salt, |